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

How to properly fill PDFAcroSignature field? #637

Closed
NoahCardoza opened this issue Oct 18, 2020 · 3 comments
Closed

How to properly fill PDFAcroSignature field? #637

NoahCardoza opened this issue Oct 18, 2020 · 3 comments

Comments

@NoahCardoza
Copy link

I read over the PDFSignature docs and see that this lib doesn't support PDF signing. However I'm trying to use it in junction with node-signpdf.

I opened an issue regarding the same question but I assume this lib is more suited when it comes to filling out a form.

Any suggestions or guidance would be much appreciated, thanks!

@NoahCardoza NoahCardoza changed the title How to properly fill PDFAcroSignature? How to properly fill PDFAcroSignature field? Oct 18, 2020
@gizmodus
Copy link

gizmodus commented Oct 19, 2020

@NoahCardoza I was able to sign the PDF by applying the placeholder with pdf-lib like explained here:
#112

The signature is visible now in Acrobat. The only problem is that in Acrobat it says:
"Signature is invalid: There are errors in the formatting or information contained in this signature (The signature byte range is invalid)"

Does anybody have a clue what could be the cause of this?

@NoahCardoza
Copy link
Author

So I already have an existing \Sig \Widget in the PDF. The problem is getting the existing form to recognize when it gets signed. Looking over that thread it seems they are adding a new widget. Not to mention the underlying package node-sign isn't able to detect the form since the version of the PDF is 1.3.

@Hopding
Copy link
Owner

Hopding commented Nov 14, 2020

Hello @NoahCardoza! You are correct that pdf-lib does not currently provide signature APIs. I've answered some questions about signatures before, some of which used node-signpdf to add digital signatures to a document. Unfortunately digital signatures in PDFs are a mess of complexity (which is why pdf-lib doesn't already have APIs for this). I would like to help, but I'm afraid I don't have the time to help you troubleshoot since this doesn't relate to pdf-lib's official APIs. The best I can do is suggest you take a look at the issues related to signatures. I wish you luck!

@Hopding Hopding closed this as completed Nov 14, 2020
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