Closed dcbr closed 5 months ago
Reading through your description, this seems like an exciting contribution. I'll give it a more thorough look in the coming days but I love every word of the description.
I'll get that released today or tomorrow. Thank you for a great contribution!
Awesome library! I would like to use it for web applications, in combination with the pdf-lib library, for which following enhancements are required or useful.
Overview
node:Buffer
type, web applications are not supported right now (type error). This PR accepts beside theBuffer
also theUint8Array
(both available in Node and Web applications) andstring
(base64 encoded bytes) types when signing a pdf or creating aP12Signer
. An extra utility functionconvertBuffer
is introduced for this.PDFDocument
orPDFPage
input, supporting signatures on other pages than the first one.signingTime
input, such that it can be matched with the document creation or modification time.PDFInvalidObject
, such that it is not serialized in an object stream. This means the{useObjectStreams: false}
is no longer needed when saving the document (and thus compressing the final signed pdf size).Prop_Build
dictionary for the signature. Allowing to specify which filter and application were used to generate the signature.signingTime
input, such that it can be matched with the document creation or modification time.