Skip to content
New issue

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

PDF Version backward compatibility #280

Open
wildhart opened this issue Mar 22, 2022 · 2 comments
Open

PDF Version backward compatibility #280

wildhart opened this issue Mar 22, 2022 · 2 comments

Comments

@wildhart
Copy link

Hi, first thanks for this awesome library - I've been using it on a particular project for years.

I have a new requirement on this project to digitally sign PDFs generated with pdfjs, and have been tyring to use node-signpdf. Problem is, that library doesn't work well with streams or PDF version > 1.3. If I use an online converter to downgrade the file to PDF version 1.3 then it works fine.

Is it possible to make pdfjs save files in PDF 1.3 format, or without using streams?

@rkusa
Copy link
Owner

rkusa commented Mar 22, 2022

pdfjs isn't creating object streams itself. You'll only end up with object streams if you append pages from external documents that use object streams. I am not entirely sure from the top of my head, but I think pdfjs might be using some features around fonts that are from newer PDF versions than 1.3. There is currently no option to change the version except patching this line https://github.com/rkusa/pdfjs/blob/main/lib/document.js#L39.

@alexvrv
Copy link

alexvrv commented Mar 23, 2022

Any chance to add that option to change the PDF version, please? I have the same issue... i can't digital sign even with adobe.

UPDATE: it's not from the version, i've tried with 1.3 and 1.4 but i get error 23 with Adobe Reader while trying to digital sign the document. If i convert it to the same version or any other version it works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants