- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I’m facing an issue on a Zurich family instance with Document Templates and PDF Generation Utilities. Here’s the scenario:
- In my Yokohama PDI, clicking Preview on an HTML Document Template works fine and generates a PDF.
- On the client Zurich instance even for OOB records, clicking Preview on the same type of template fails with:
“Unable to preview document due to an error.”
Troubleshooting Done
Verified plugins: Document Templates and PDF Generation Utilities are active.
Tried minimal HTML (“Hello World”) in both Document Templates and direct API calls.
Used Document Templates API:
new sn_doc.GenerateDocumentAPI().generateDocumentForTask('<record_sys_id>', '<template_sys_id>', 'DocTemplate_Test.pdf');var html = '<h1>Hello PDF</h1><p>This is a smoke test.</p>';
new sn_pdfgeneratorutils.PDFGenerationAPI()
.convertToPDF(html, 'sn_hr_core_case_compensation', '<record_sys_id>', 'HelloSmoke.pdf', '<font_family_sys_id>');→ Also fails with:
Ask
- Has anyone seen this pdfOS is null error in Zurich?
- Is there a known fix or patch for HTML→PDF conversion failures?
- Any additional configuration needed for Font Families or converter settings?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @Ankur Bawiskar ,
In my case ,by clearing the browser cache,the error get wipe out and now I am able to preview the document and generate it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
did you ever find the solution to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
No.
we have raised a Hi Ticket and not got response till now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
I am not 100% sure, but it appears that this is an iText error saying, "I'm out of memory".
What unstuck us was two-fold:
- Image size: Ensuring any images being included in the PDF were able to fit on a single PDF page (max width of ~800 px, but I had to trial and error to get that to work). If you're using base64 encoding for images, you have to ensure that the file is that small when uploading, not just controlling it with css.
- Removing any css with "page-break-inside" as it appears that was causing infinite pages to be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Okay, it doesn't seem to be the case for us. I'm trying to generate a PDF from quite a short HTML-text and it fails. And at the same time, it works with a lot more complex texts with images, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Quick update - in our case the problem was caused by <meta>-tags in HTML-document. Once I cleared them the generator worked fine:
html = html.replace(/<\s*meta\b[^>]*>/gi, '');
