We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Export HTML (which Linked from URL) to PDF

ABCD88852527207
Tera Expert

Hi Experts,

I have a requirement:

Click Export PDF button in page1, then generate the HTML to PDF documents for each page which in the URLs.

SystemsGo_0-1742364328715.png

 

Currently, we have the following code:

 

 
But all the Exported PDFs are only display content loading, how to resolve this issue?
4 REPLIES 4

Ankur Bawiskar
Tera Patron

@ABCD88852527207 

what's your business requirement here?

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

Hi Ankur,

 

Thank you for your reply.

 

I would like to export the HTML to PDF. But The HTML are in other pages. we should click the link href="{{gs.getProperty('glide.servlet.uri')}}/sp?id=timesheet_by_client_list&client={{record.client.sys_id}}&year={{clientTimesheetData.filterData.year.value}}&month={{clientTimesheetData.filterData.month.value}} to get the HTML.

 

But what I would like to do is click button Export PDF on this page to export all the pages in the links,

 

How can I implement this?

ABCD88852527207
Tera Expert

Hi All,

 

I think maybe we can use a work around to implement this. I can set the PDF export logic in Service Side Script. just need to checked data as input.

@ABCD88852527207 

what's your business requirement here?

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