Issue with pdfDocument.Pages.Count in Aspose.PDF for C#

Hi,

I’m using Aspose.PDF for C# and facing an issue where pdfDocument.Pages.Count does not return the correct number of pages in a PDF document. However, PdfFileInfo.NumberOfPages works as expected.

When I try to access pages beyond the count returned by pdfDocument.Pages.Count, I get an “Invalid index” error. Could you please help resolve this discrepancy?

Thank you,

@asemalsaif
Could you share the document that causes the issue?

The Lost City of Eldoria.pdf (131.8 KB)

@asemalsaif
I tested on latest version (currently it’s 25.01) and problem wasn’t present
Can you try to upgrade version and check if it still occurs?