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

Free Support Forum - aspose.com

Convert XML to PDF - Display Page Number in Page Header of PDF using Aspose.PDF for .NET

Hello Support-Team,

I have created PDF document from xml using Aspose.pdf. Generated PDF
document also contains header,footer & content section but i don’t
find any documentation to add a page no (like 1 of 10) in header section
of each page through xml. please share documentation with me, how to
add page no in PDF document using XML to PDF transform.

Header section is mentioned in XML So is it possible to generate a page no through xml tag?


Hi Gaurang,

Thanks for using our products.

In order to display page number information in Header section when generating PDF file from XML, please try adding following tags in your XML file. In case the issue still persists, please feel free to contact.



<Segment>page $p of $P</Segment>

In case you face any issue or you have any further query, please feel free to contact.