Iterating over PageCollection does not match Pages.Count

Hey,


I must be doing something wrong, as this doesn’t make any sense.

Document pdfDocument = new Document(“source-pdf.pdf”);
Console.WriteLine("# of pages: " + pdfDocument.Pages.Count);
foreach(Page page in pdfDocument.Pages)
{
Console.WriteLine(page.Number);
}

Generates:

# of pages: 30
1
2
3
4

Why does this over loop only 4 times if there are 30 pages?

Sadly, this is a sensitive document and I cannot share it.

I can confirm the PDF does have 30 pages when opening it in Acrobat.

Thanks


Ahhhh … i think this might be due to having a trial license for testing. Is this accurate?

Hi Andrew,

Thanks for using our API’s.

Yes you are correct. There are some limitations when using the API in trial mode. However in order to test the API without any limitation, you may consider requesting a 30 days temporary license by following instructions specified over Get a temporary license