Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.