Error when merging static PDF

  • Hello everyone,

    I'm encountering a specific error when generating reports, only in certain PDF files. While most PDFs are generated successfully, some of them trigger an error. The error message is as follows:

    Report "main" render failed.
    Error while executing pdf-utils operations
    (because) cannot read properties of undefined (reading 'map')
    TypeError: Cannot read properties of undefined (reading 'map')
        at collectPages (/app/node_modules/@jsreport/pdfjs/lib/documentBase.js:4:57)

    I've attached a playground link where you can reproduce the issue:

    Your assistance in resolving this matter would be greatly appreciated.

    Thank you in advance!

  • You are trying to merge with a static pdf which is not a valid PDF. It's source is corrupted.

    You can open it in Acrobat and convert it to PDF/A to resolve the issue.

    Here is the fixed pdf
    fixed static pdf.pdf

Log in to reply

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