Complex headers cause timeouts

  • Hi,

    We're trying to generate a PDF with the first page(s) in landscape, followed by a set of pages in portrait.
    When we add headers to the PDF, jsReport seems to timeout if the PDF is too large.
    We're trying to leverage the power of jsreport-utils and PDFOperations (which is necessary anyway for the portrait vs landscape pages). Note that the header and footer are custom generated for landscape vs portrait margins and width.
    Any suggestion for a better performing report would be welcome.
    Currently the structure is the following:

    - Portrait
    -- Operations: [Merge header, merge footer]
    - Landscape 
    -- Operations: [Merge header, merge footer, append portrait]

  • Would you be able to replicate the issue in the playground?

    Or prepare a minimal sample repository we can check out.

    If this won't be possible. I would need your logs for the start.
    Thank you.

  • The issue itself has been solved by changing the way headers and footers are generated, using the merge whole documents functionality. No timeouts are happening now anymore.
    As a follow-up question: are there ways to speed up the generation of the PDFs? At this moment we're running the Docker 2.3 jsReport engine in an Azure webapp (with 7GB of RAM, which should really suffice imho). PDF generation takes up to 10-14 seconds for 5 pages, using the same setup as in the first post.

  • Not sure how much power you get in the end from the azure web app. How long it runs on your desktop? 10s for 5 pages is quite too much.
    Check from the logs what is taking the most of the time. It is typically the chrome pdf conversion. Try to remove your styles and add them back step by step to check which one is the bottleneck. Then try to work around it.

Log in to reply

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