Skip to footer content

How to Get PDF Page Count in C# | IronPDF

Reading the number of pages in a PDF is a small step that a lot of document workflows depend on.

This video walks through getting the total page count of a PDF document in C# with IronPDF. It covers loading an existing PDF file, accessing the document's properties, and reading the page count programmatically inside a .NET application. A reliable page count helps with validating uploads, driving reporting systems, enforcing size limits, and processing large batches of documents. Because IronPDF reads the file directly, you do not need an external PDF reader or extra dependencies, and the same pattern extends to other document metadata you might need later.

Related Videos

Ready to Get Started?
Nuget Downloads 19,940,058 | Version: 2026.7 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPdf
run a sample watch your HTML become a PDF.

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me