Skip to content

Unable to sign a merged document #102

Discussion options

You must be logged in to vote

For some reason, the AcroForm dictionary in your input file doesn't contain a Fields entry. That's a file format error, and also very bizarre because AcroForm serves no purpose other than managing form fields.

The easiest way to work around this particular instance of the problem is to delete the AcroForm entry before letting pyHanko do its thing---assuming you know for sure that all your input files won't contain legitimate form data. Assuming you have the file open in an IncrementalPdfFileWriter, it should suffice to put in something like

try:
    del my_writer.root['/AcroForm']
except KeyError:
   pass

Again, it's a workaround, but this is a pretty clear-cut case of bad input.

Hope tha…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Vishwamithra37
Comment options

@MatthiasValvekens
Comment options

Answer selected by Vishwamithra37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants