modern-pdf-lib / embedSignature
Function: embedSignature()
embedSignature(
preparedPdf,signatureBytes,byteRange):Uint8Array
Defined in: src/signature/byteRange.ts:549
Embed a signature into the prepared PDF at the placeholder position.
Writes the hex-encoded signature bytes into the /Contents <…> placeholder, replacing the zero bytes.
Parameters
preparedPdf
Uint8Array
The prepared PDF bytes (from prepareForSigning).
signatureBytes
Uint8Array
The DER-encoded signature (PKCS#7/CMS).
byteRange
The ByteRange result from prepareForSigning.
Returns
Uint8Array
The signed PDF bytes.