Update from 0.7 to 0.12.1 and now returns error on signing pdfs #86
-
I get the following error: My sign request: Any ideas where the error could be? My parameters: cms_signer = PKCS11Signer(cms_session,signing_cert=certlabel,bulk_fetch=False,key_id=keyid) and
original_file = IncrementalPdfFileWriter(pdf_file) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @vtgdias, This is explained in the release notes for For some further background: the file you're trying to sign is a hybrid reference file. Those were introduced as a transitional compatibility measure between PDF 1.4 and PDF 1.5 (which was a godawful idea in hindsight) and they're relatively rare these days, but some tools still routinely generate such files (looking at you, MS Word). Prior to Hope that helps :) |
Beta Was this translation helpful? Give feedback.
Hi @vtgdias,
This is explained in the release notes for
0.12.0
.For some further background: the file you're trying to sign is a hybrid reference file. Those were introduced as a transitional compatibility measure between PDF 1.4 and PDF 1.5 (which was a godawful idea in hindsight) and they're relatively rare these days, but some tools still routinely generate such files (looking at you, MS Word).
Prior to
0.12.0
, pyHanko would actually not process these files correctly and would sometimes even accidentally corrupt them. That bug has been fixed, but there's more to it than that. The problem with hybrid files is that by design there's no single unambiguous way to parse them, which makes th…