Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Enable Header and Footer for only first page of PDF using PDF Generation API

Sai kumar123
Tera Expert

Hi, I am working for a requirement, the client wants to generate a custom pdf for one of his table records, and one specific requirement is they want heaer and footer only in the First Page.

As the PDF is a very complicated One involving the data of many related tables, We Used "

PDFGenerationAPI", 

to demostrate it here i created a dummy use case in my instance,

My question is , is there any method in this API or somewhere in Servicenow to access, how many Pages are being created for the PDF everytime and based on that, i want to show the header and footer for those specific pages.

 

Here is the dummy code i wrote for understanding

Saikumar123_0-1744642113156.png

 

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Sai kumar123 

I doubt this much customization is allowed in that API.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Sai kumar123
Tera Expert

yeah, i also feel the same

 

@Sai kumar123 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader