Error: Error while executing pdf-utils operations. Invalid name
-
Hi.
I am using pdf-utils to merge an existing PDF file (static-pdf recipe). After running the report I get the error.Report "main" render failed. Error while executing pdf-utils operations. Invalid name Error: Error while executing pdf-utils operations. Invalid name at module.exports (/app/node_modules/@jsreport/jsreport-core/lib/shared/createError.js:10:13) at WorkerReporter.createError (/app/node_modules/@jsreport/jsreport-core/lib/shared/reporter.js:47:12) at AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-pdf-utils/lib/worker.js:191:22) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21) at async afterRender (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:104:5) at async WorkerReporter._render (/app/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:152:7) at async /app/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:172:19 at async Domain.<anonymous> (/app/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:141:19) caused by: Error: Invalid name at Function.parse (/app/node_modules/@jsreport/pdfjs/lib/object/name.js:66:13) at Function.parse (/app/node_modules/@jsreport/pdfjs/lib/object/dictionary.js:77:27) at Object.exports.parse (/app/node_modules/@jsreport/pdfjs/lib/object/value.js:20:30) at Function.parse (/app/node_modules/@jsreport/pdfjs/lib/object/dictionary.js:80:30) at Object.exports.parse (/app/node_modules/@jsreport/pdfjs/lib/object/value.js:20:30) at Function.parse (/app/node_modules/@jsreport/pdfjs/lib/object/dictionary.js:80:30) at Object.exports.parse (/app/node_modules/@jsreport/pdfjs/lib/object/value.js:20:30) at Function.parse (/app/node_modules/@jsreport/pdfjs/lib/object/dictionary.js:80:30) at Object.exports.parse (/app/node_modules/@jsreport/pdfjs/lib/object/value.js:20:30) at Function.parseInner (/app/node_modules/@jsreport/pdfjs/lib/object/object.js:85:28)
playground link: https://playground.jsreport.net/w/anon/mYsGj2fv.
-
Your pdf is linearized and pdf utils, unfortunately, can't work with such pdf.
Perhaps the editor you use to create pdf allows you to create pdf without linearization.
In case you use "Foxit Advanced PDF Editor", you shouldn't use the option "Save As optimizes for Fast Web View". I've never used this editor, just see it in the documentation.