We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The library's(new PDFMerger()).add() function throws error "Expected instance of PDFDict, but got instance of undefined" when used with pdf/a files.
Following doesn't work with a pdf/a format: pdf-a.pdf
npx pdf-merger-cli out.pdf pdf-a.pdf pdf-a.pdf
Following does work without a pdf/a format: pdf-woa.pdf
npx pdf-merger-cli out.pdf pdf-woa.pdf pdf-woa.pdf
The text was updated successfully, but these errors were encountered:
Another such file can be downloaded from https://www.manulife.ca/content/dam/consumer-portal/documents/en/forms/grs/other/GP0770.pdf
Sorry, something went wrong.
I met the same issue when using merger.add() to merge some of the files. @jaslam-ca @mojoaxel any idea for this?
const render = async () => { const merger = new PDFMerger(); for (const file of files) { console.log("sonnn", file); await merger.add(file.file).catch(e => { console.log("sonnn", e); }); } const mergedPdf = await merger.saveAsBlob(); const url = URL.createObjectURL(mergedPdf); return setPdf(url); };
I believe this is because this pdf-merger-js libary uses the (no longer maintained) pdf-lib behind the scenes, which doesn't support pdf/a files.
pdf-merger-js
pdf-lib
See: Hopding/pdf-lib#1260
No branches or pull requests
The library's(new PDFMerger()).add() function throws error "Expected instance of PDFDict, but got instance of undefined" when used with pdf/a files.
Following doesn't work with a pdf/a format:
pdf-a.pdf
Following does work without a pdf/a format:
pdf-woa.pdf
The text was updated successfully, but these errors were encountered: