How to set a Title for the PDF.

Yogesh Verma1
Tera Contributor

I am using this code to print the PDF of any record, but I am not able to provide a title to the PDF. Can anyone please help me to provide a custom title to the PDF through this approach?

 

 

function printPreviewList() {
    var url = "CUSTOM_TABLE_NAME.do?sysparm_stack=no&sysparm_media=print&sys_id=" + current.sys_id;
    g_form.getUniqueValue();
    g_navigation.openPopup(url);
}

 

 

1 ACCEPTED SOLUTION

Sumanth16
Kilo Patron

Hi @Yogesh Verma1 ,

 

From my experience with PDF generation scripts in ServiceNow I can tell you that there is a possibility to include header image but not text.

Please check the script include GeneralPDF once. That will give you idea what parameters can be passed.

It has header image, footer image, footer note, header position, footer position, page size.

 

Plz mark my solution as Accept, If you find it helpful.

 

 

Thanks & Regards,

Sumanth meda

View solution in original post

2 REPLIES 2

Sumanth16
Kilo Patron

Hi @Yogesh Verma1 ,

 

From my experience with PDF generation scripts in ServiceNow I can tell you that there is a possibility to include header image but not text.

Please check the script include GeneralPDF once. That will give you idea what parameters can be passed.

It has header image, footer image, footer note, header position, footer position, page size.

 

Plz mark my solution as Accept, If you find it helpful.

 

 

Thanks & Regards,

Sumanth meda

Hi @Sumanth16 ,

 

I am trying to print the PDF of a record in Servicenow that is containing the fields on the form, the variable section, and the related list part. Is it possible to configure this requirement with the PDF generation scripts?

 

Is there any example of PDF generation script that you can provide me?