Create and open a pdf file with script

demgnekamdem
Tera Contributor

Hi all,

I want to create an open a pdf file after click on a button (UI action).
Which script can I write on ui page to create an open a pdf file with a table (number, username, email and company) ?

Thanks in advance,
Carole

1 ACCEPTED SOLUTION

anubhavritolia
Giga Sage

Hi,

 

To create PDF document, you can create record in PDF Document Template and than using below code you can generate PDF using UI Action. Check below links:

https://developer.servicenow.com/print_page.do?release=quebec&category=null&identifier=PDFGeneration....

https://docs.servicenow.com/bundle/tokyo-employee-service-management/page/product/human-resources/ta...

 

View solution in original post

2 REPLIES 2

Saurav11
Kilo Patron

Hello,

 

Did you go through the below article:-

 

https://www.servicenow.com/community/developer-articles/generate-pdf-and-attach-to-the-record/ta-p/2...

 

Please mark answer correct/helpful based on Impact.

anubhavritolia
Giga Sage

Hi,

 

To create PDF document, you can create record in PDF Document Template and than using below code you can generate PDF using UI Action. Check below links:

https://developer.servicenow.com/print_page.do?release=quebec&category=null&identifier=PDFGeneration....

https://docs.servicenow.com/bundle/tokyo-employee-service-management/page/product/human-resources/ta...