GeneralPdf Error: The document has no pages

stevejarman
Giga Guru

Hi - I'm using the GeneralPDF script include to generate PDF documents from ServiceNow (i.e. passing HTML to it).

I have this solution working perfectly in our own instance, and I'm now trying to do something similar (I'm using the same code, only modified for content) with another instance.

When I attempt to call the PDF generation though, I'm getting the following error in the System Log:

Root cause of JavaScriptException: com.itextpdf.text.ExceptionConverter : ExceptionConverter: java.io.IOException: The document has no pages.

I've found only one similar reference online where the user was passing HTML that defined 9 header columns, but only 5 data columns. I've checked the HTML that I'm feeding to GeneralPDF and I can see no such problems.

Does anyone have any other ideas on what this error could mean? Has anyone experienced this themselves?

 

6 REPLIES 6

Hi Steve,

Do you mind sharing your code as I'm trying to do the same but not able to implement it. It will be very helpful.

worked like a charm thank you!