Unable to do multiple signatures on a single PDF document #108
-
Hey, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
First off, pyHanko should never attempt to overwrite the value of a signature field. When in doubt, it should throw an error before signing. If it ends up clobbering the previous signature, then it's probably a bug, and I'd like to see your code so I can figure out what's triggering that behaviour. While applying multiple signatures to a PDF document is certainly possible (and pyHanko supports that use case) there are a couple of things you need to be careful with:
Here's a toy example from the test suite (note that it doesn't follow the advice in point 3, but the rest applies): pyHanko/pyhanko_tests/test_diff_analysis.py Lines 96 to 112 in ab55604 Does that help with figuring out where the problem might be? If not, please post the code. |
Beta Was this translation helpful? Give feedback.
First off, pyHanko should never attempt to overwrite the value of a signature field. When in doubt, it should throw an error before signing. If it ends up clobbering the previous signature, then it's probably a bug, and I'd like to see your code so I can figure out what's triggering that behaviour.
While applying multiple signatures to a PDF document is certainly possible (and pyHanko supports that use case) there are a couple of things you need to be careful with:
IncrementalPdfFileWriter
(this one is critical)