mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-05 11:52:48 +01:00
/Type is optional in a signature dictionary (PDF 32000-1, 12.8.1) and some signers leave it out, so those documents still reported "No Signatures Found". A dictionary without /Type that carries both /ByteRange and /Contents is now read as a signature; document timestamps (/Type /DocTimeStamp, /SubFilter /ETSI.RFC3161) stay out because they hold an RFC 3161 token, not a CMS signature over the document. Also covers a /Contents placeholder of 74,506 hex characters, the largest seen in real signed documents, which the former fixed scan window dropped. Fixes #831 Co-Authored-By: Claude Opus 5.5 <[email protected]>