HTML to PDF bigger images
I use the HTML to PDF node, it works fine with images of size 1024x1024. I tested 32 pages (a book can have 60 pages), where each page have an image. But, I generate pdf for printing books with lulu.com. I need images of 4096x4096 to match the lulu's requirements. With that size, it generates the pdf, but when I try to open it, I get 'Error Failed to load PDF document'. Is there a limit on your server for Puppeteer or something?
18 Replies
cc @Deepanshu, can you help checking if there is any limit on puppeteer to process images with larger size? Or something we can update in puppeteer pdf runner?
@Francois can you share the details of parameter you are trying to use for the HTML to PDF node?
The pdfOptions for Pupeteer? Something like that:
const pdfOptions = {
width: '8.75in',
height: '8.75in'
};
here's the node logic: https://docs.google.com/document/d/1v5LBRb_APotbxb67KmOVLrIbZgohIxePmxQfQzuXsw8/edit?usp=sharing
or if it helps, my Buildship link: https://buildship.app/p/buildship-0i2pvh/workflow/n8jY3VGNdhz2xxOS22j4
@Francois can you share sample input for
data
as mentioned in your node logic?Yes just added in the doc
@Deepanshu let me know if you need anything else to test, thanks!
No need to find a solution, I use images of 3072x3072 now and it works fine!
@Deepanshu it's me again... I don't understand, it used to work with 3072x3072 images but now it doesn't. If I have 15 images, it works when it's the same image repeated (it would never happen but I wanted to test if my link is the problem, it appears it's not), but when I have 15 different images, the pdf link is generated but I can't open it.
Updated the doc so you can test it: https://docs.google.com/document/d/1v5LBRb_APotbxb67KmOVLrIbZgohIxePmxQfQzuXsw8/edit?usp=sharing
Google Docs
Buildship PDF node logic
I'm really close to launch the beta of my software, would be great if Buildship don't break in the future with the pdf generations, I want to be sure it will work no matter the number of images and pdf
Hey @Francois , can you please send a support request through buildship app with these details? Also, include the discord message link!.
Perfect, just sent it
hey! It's been almost a week, did you find something?
Hi @Francois, yes, we have progress on the above issue, we'll be releasing the updated version for this soon, thank you for your patience.
No prob, thanks!
Hey @Francois , the issue occurs with the invalid pdf because the puppeteer timeouts when setting the html-content for different-images-case, the issue will be resolved after passing custom
navigationTimeout
param in request-body.
Let me know if above works!I have slightly updated your node-logic^
Thanks! But weird, just tested it and I still get the same thing, it generate a link but 'Failed to load PDF document' error message
Can you try to log the
response
and share the data?You mean the links generated?
Added this, but still only get the links
hey @Deepanshu , do you have more details on what you need? Thanks