PDF Page numbers

Hello,

I am trying to get the correct page number when searching through a document for text. I get the Page object that contains the text, but the page number is the number of pages from the start of the document, rather than the actual page number. The documents I am working on starts with page numbers 36, 130, 222, etc. So the 5th page that contains the text I am after is actually page 41.

Another solution would be to just look at the document properties and find the starting page number and count from there, but I cannot find that property in the object model either.

Regards,

Schalk

Hi Schalk,

Thanks for your interest in our products.

Count pages from the start of the document is the normal behaviour of the Page object and I am very sorry to share with you that currently Aspose.Pdf does not provide the facility to find starting page number and start count from there. However, if you are working on the document which starts from page 36, you can manually add this number to the value returning from the Page object.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

Does anyone know how to insert page numbers into a .pdf document? I
have searched through Acrobat and Preview to no avail. I need the
numbers to appear on the printed page. Is there another program that I
should try.



Thanks,

Hi Schalk,

Kindly check the following documentation link for details and code snippets as per your requirement.

Add Page Number in a PDF File (Facades)

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,