PDF way too slow - PDF 3 minutes; HTML 5 seconds.

  • What can be done to speed up PDF generation? The report I've worked out is identical for both my HTML and PDF versions in terms of the content. All that the PDF adds is a header and a footer. Even if I remove the header and footer, the PDF still takes a while, although not the full 3 minutes. But at 1 minute per page, I'm worried. Many of my reports will be over 100 pages. I can't have users wait 100 minutes for 100 pages. Do different versions of headless chrome work at different speeds? Should I try the phantom option? Am I the only one with this issue? If so, what should I be looking for that I'm doing wrong?

    BTW, I was on 2.4.0 and although I had my PDF working yesterday, it wasn't working today. I updated to 2.5.0 with the 2.5.1 version of studio, and now it does. No changes to my code.

    Side note: thanks admins for helping me prep my pre-existing app to work with 2.5.0. It was all about moving the setup of jsreport to before any other middleware was added to my main app.

  • I had one table. Converted it to DIVs. No change.

  • This always depends on your template.

    You can see a very complex report like the following performs quite well with 1.5s for the page on very low HW.

    I would recommend you to remove styles, charts, images, tables step by step and always measure rendering time change.
    This way you can find out what element or style takes the most of the time to render.
    Then you can try to do the particular visualization differently.

    You can also try to share it with us in the playground and we will take a look if there is something you can do.
    However please try the first the previous recommendation, because we would start with the same anyway.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.