Electron/wkhtmltopdf Timeout
-
Hello,
First of all I use jsreportonline so I don't have Chrome-Pdf :(
When I generate a big report with a lot of images store in my azure blob container.
I Have a lot of timeout with Electron-pdf or wkhtmltopdf like:
wkhtmltopdf: Error occured - Error during rendering report: Error: ETIMEDOUT
Electron-pdf: Error occured - Error during rendering report: Error: Worker Timeout, the worker process does not respond after 20000 msI would like to know if is possible to increase the timeout? Or maybe there is a better way to load the images from Azure storage?
Thanks a lot.
-
This is fixed timeout for everyone. See the jsreportonline limits - https://jsreport.net/learn/online-limits
I've seen such problems previously and it helped to resize the images before referencing them in jsreport.
What is the size of the images you download from the blob storage? How many of them?
Maybe you don't the full size and you can resize it upfront?
-
I think that chrome/phantomjs/wkhtmltopdf are rendering images into pdf always with full original size.
In the original resolution. Even if you set img width and height the resolution is the same.
This can end up with giant pdf and very very long rendering.On the other hand if you render html in browser. The image resolution is changed based on the html element width and height.
The html is then rendered in a second.That being said, you very likely need to change the image resolution upfront.
Perhaps you can use some cool serverless azure functions to do the job or do it inside your application.
-
Ok, thank you for you answer.
And Yes the giant PDF take a very long time.
The photo size depends on device (Iphone, Android). And the numbers depends for each report but it wiil 3 or 15 images.