I need to extract the numner of pages of a pdf in c#. Actually I trying a bit with itextsharp but there only a method where i can extract the page size (the rectangle) but nothing where i can see the number of pages. Any idea?
static void Main(string[] args)
{
Console.WriteLine("starting");
String filename = "d:\\tmp\\t1.pdf";
if (File.Exists(filename)){
byte[] pdfFile = File.ReadAllBytes(filename);
PdfReader reader = new PdfReader(pdfFile);
}
}