Styling/alignment issue during pdf generation

  • Hello,

    We are generating mass pdfs from templates created using handlebars. The pdf is causing styling issues at random places and random pdf files. I have attached a sample image which explains the issue.

    Styling issue


    Expected behaviour



    1. The alignment issue does not occur HTML format. it occurs only during conversion of HTML to PDF
    2. When generating mass pdfs (~500), this error occurs randomly and to a sizable amount of pdfs
    3. This occurs only inside tables
    4. Regenerating pdfs reproduces the same error
    5. Running JsReport server on AWS and localhost results in reduction in occurrence of error / same issue at a different place in the pdf

  • Hi,

    do you use a third-party library for rendering that "bar chart"?
    Maybe it uses some kind of animation and you need to wait for it to finish before printing.
    Please see the chrome pdf printing triggers

  • Hey @jan_blaha,

    Thanks for responding. I tried setting the timeout for async tasks to complete as mentioned in the link you posted.
    Unfortunately, that didn't resolve the issue.
    This specific issue doesn't occur when we try to generate by running the server locally. Occurs only when we using AWS instance
    We are running the JsReport server on Elastic Beanstalk - Node.js 12 running on 64bit Amazon Linux 2/5.2.4

  • This is very hard to troubleshoot and it will need some work to isolate the problem.
    Could you try to extract the minimal part of the code from your template to a new one?
    Write some kind of script to render multiple reports from this template and see if it has still the error behavior.
    And if you get to this, share the template with us so we can take a look?
    You can email it to me if it is confidential.

Log in to reply

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