Signature
Provides functionality for signing PDF documents. Supports both digital signatures (with certificate) and electronic signatures (visual only). The class enables adding signatures to PDF documents: Digital signatures use PFX/P12 certificates to cryptographically sign the document.Electronic signatures add visual representation (image/text) without cryptographic signing. For PAdES-B compliance, use CAdES signature mode (the default). For PAdES-T compliance, configure a in the signature options.
Functions
Link copied to clipboard
public final void addDocumentTimestamp(Document document, FileOutputStream output, TimestampConfiguration timestamp)
Appends a document timestamp to a document, writing the result to a stream.
public final void addDocumentTimestamp(Document document, String outputPath, TimestampConfiguration timestamp)
Appends a document timestamp to a document, protecting its current state and its validation material.
Link copied to clipboard
Adds long-term validation material for all signed signatures, writing the result to a stream.
Adds long-term validation material — certificates and revocation information — for all signed signatures of a document, upgrading it toward PAdES B-LT.
Link copied to clipboard
public final void finishSignature(Document preparedDocument, FileOutputStream output, Array<byte> signedData, DigitalSignatureOptions options)
Completes external signing (phase two) with a raw signature value, writing the result to a stream.
public final void finishSignature(Document preparedDocument, String outputPath, Array<byte> signedData, DigitalSignatureOptions options)
Completes external signing (phase two) with a raw signature value produced by an external signer.
Link copied to clipboard
public final void finishSignatureWithCms(Document preparedDocument, FileOutputStream output, Array<byte> signatureContainer)
Completes external signing (phase two) with a complete signature container, writing the result to a stream.
public final void finishSignatureWithCms(Document preparedDocument, String outputPath, Array<byte> signatureContainer)
Completes external signing (phase two) with a complete signature container produced by an external signing service.
Link copied to clipboard
public final Array<byte> prepareSignature(Document document, FileOutputStream output, DigitalSignatureOptions options)
Starts external signing (phase one), writing the prepared PDF to a stream and returning the bytes an external signer must sign.
public final Array<byte> prepareSignature(Document document, String outputPath, DigitalSignatureOptions options)
Starts external signing (phase one): prepares the document with a signature placeholder and returns the exact bytes an external signer must sign.
Link copied to clipboard
Applies an invisible digital signature to a document, writing the result to a stream.
Applies an invisible digital signature to a document.
Link copied to clipboard
public final void signField(Document document, FileOutputStream output, String fieldName, DigitalSignatureOptions options, SignatureAppearance appearance)
Applies a signature to a document using an existing signature field, writing the result to a stream.
public final void signField(Document document, String outputPath, String fieldName, DigitalSignatureOptions options, SignatureAppearance appearance)
Applies a signature to a document using an existing signature field.