Static Pdf Render error



  • Hi Jan & friends,

    We use the afterRender() function to add a cover page to our content. I am noticing that on some PDF's, using the Static Pdf using an asset on a template fails with this error:

    Here is a link to a playground minimal demo of the issue:
    https://playground.jsreport.net/w/bobsyourgrannie/L~nktzrS

    Just run TemplateMain and you will see the issue:
    0_1674195798546_upload-cb581f53-9135-443a-b900-1c80eca0e77c

    In afterRender() toggle between a PDF that does work ('success') and one that fails ('fail'). In some other testing it says that it is running into the issue in zlib.

    I am hoping you might be able to advise why some PDFs cause this issue, whether it be a format/compression issue, PDF security, or a bug.

    I've noticed the same error occuring for another user here but his situation was different:
    https://forum.jsreport.net/topic/2570/clickable-image-in-subtemplate-merged-doesn-t-work

    Thanks,

    Cameron



  • We currently investigate this issue.
    The reason is that the pdf structure uses some new features we don't fully support yet.

    The workaround is to open the pdf in a tool like acrobat and downgrade its version to 1.3 for example.



  • Thank you for the information Jan.



  • I was able to fix that here. It will be part of the next release 3.10.1 or 3.11.0. It's not clear when that happens, but you may subscribe to jsreport releases on github and get notified.


Log in to reply
 

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