We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Incorrect Page Count

I am using this code below to get the page count on a document. I created a PDF document with a blank back page. This code incorrectly returns 1 pages instead of 2 pages. What am I doing wrong?document2.pdf (96.4 KB)

            Document pdfDocument = new Document(pdfFile.FullName);

            return pdfDocument.Pages.Count;


Thank you for contacting support.

We have worked with the data shared by you but we have not been able to reproduce it with Aspose.PDF for .NET 19.4. In case you still face the issue then please share a narrowed down sample application so that we may investigate further to help you out.

Moreover, if you are evaluating the API then you may test it in its full capacity by applying a free 30-days temporary license as explained in Licensing.