prepareSignature

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. Complete the signature with or , either in the same session or after reloading the prepared document. A configured reserves room in the prepared document; the timestamp token itself is obtained during the finish phase. Levels above are not supported in the two-phase flow; add validation material afterwards with and .

Return

The bytes to be signed by the external signer.

Parameters

document

The document to prepare for signing.

outputPath

The path where the prepared PDF will be saved.

options

The digital signature options, including the signing certificate.


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.

Return

The bytes to be signed by the external signer.

Parameters

document

The document to prepare for signing.

output

The output stream where the prepared PDF will be written.

options

The digital signature options, including the signing certificate.