Replies: 2 comments
-
Hi @rbigelow I presume you're filling out the form and then signing it, right? That should generally work. If not, please show how you're calling pyHanko. If you're trying to edit a form after signing the file: you're in dangerous territory. That can work in some circumstances depending on the signature settings, but it requires a lot of care. At the very least, you need to be able to make those form edits as incremental updates to the original file, otherwise all existing signatures break. Many tools already fail at this stage. Anyway, if this is what your question is about, then you need to reevaluate your workflow and/or take it up with the maintainers of your form filling library. (There's a long-standing open feature request to add basic form filling to pyHanko as well, to close this tooling gap, but implementing it requires some effort & pretty deep file format knowledge... I'm open to PRs, but that feature isn't exactly beginner-friendly.) |
Beta Was this translation helpful? Give feedback.
-
Hi @MatthiasValvekens thank you for the speedy reply! Yes I am trying to fill out the form then and sign. I read the history with pypdf and I see both sides of the debate around having one library to rule them all vs. focus on just one thing and do it exceptionally well. To recap. It seems that it's Adobe Acrobat that is having an issue even detecting the signature if I programmatically fill the PDF, then sign. Both Chrome and LibreOffice detect the signature just fine as per the screenshots below. But if I fill the form out in Acrobat then sign it works as expected. As mentioned I have tried this same process with different form filling libraries and they appear to fill the form correctly. It's just for some reason Acrobat doesn't recognized the document as signed. No visible stamp signature shown in Adobe Acrobat, also nothing in the signature panel. I have tried a few different signature methods. Here is an example of what I using to test. from pyhanko import stamp signer = signers.SimpleSigner.load( with open('filled.pdf', 'rb') as doc:
Here is the PDF I was using for this example. |
Beta Was this translation helpful? Give feedback.
-
I am not sure if this a bug or I am doing something wrong,
It appears that if I try to append a signature field and sign a PDF form programmatically (I've tried both pypdf and fillpdf libraries) then Adobe Acrobat does not display nor detect a signature in the document. (Chrome and LibreOffice do)
However if I sign the same file unmodified or if it was modified in Acrobat then the signature is detected and displayed Acrobat.
As a test I created as simple PDF form with a first_name and last_name in Acrobat Pro (I also tried to create a form in LibreOffice) Then I used the following code to edit the form which breaks the ability for Acrobat to recognize the signature in the form-filled.pdf file.
Beta Was this translation helpful? Give feedback.
All reactions