public static class

SignerOptions.Builder

extends Object
java.lang.Object
   ↳ com.pspdfkit.signatures.signers.SignerOptions.Builder

Class Overview

A helper class used for building the SignerOptions.

Summary

Public Constructors
Builder(SignatureFormField signatureFormField, OutputStream destination)
Creates a new SignerOptions.Builder for creating the SignerOptions object to pass to the Signer.
Builder(SignerOptions signerOptions, OutputStream destination)
Creates a new SignerOptions.Builder for creating the SignerOptions object by copying existing options.
Public Methods
SignerOptions.Builder biometricSignatureData(BiometricSignatureData biometricSignatureData)
BiometricSignatureData that will be written to the digital signature.
SignerOptions build()
Build the SignerOptions object from the provided properties.
SignerOptions.Builder estimatedSignatureSize(Integer estimatedSignatureSize)
Configures the signature estimated size (in bytes).
SignerOptions.Builder signatureAppearance(SignatureAppearance signatureAppearance)
SignatureAppearance that will be used to determine how the signature looks once signing is done.
SignerOptions.Builder signatureContents(SignatureContents signatureContents)
SignatureContents that contains raw content that will be embedded inside the "/Contents" key of a signature dictionary.
SignerOptions.Builder signatureMetadata(SignatureMetadata signatureMetadata)
SignatureMetadata that contains additional metadata to add to the signature.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder (SignatureFormField signatureFormField, OutputStream destination)

Creates a new SignerOptions.Builder for creating the SignerOptions object to pass to the Signer.

Parameters
signatureFormField Signature form field to be signed.
destination Destination where the signed document will be written.

public Builder (SignerOptions signerOptions, OutputStream destination)

Creates a new SignerOptions.Builder for creating the SignerOptions object by copying existing options.

Parameters
signerOptions Signer options to copy from.

Public Methods

public SignerOptions.Builder biometricSignatureData (BiometricSignatureData biometricSignatureData)

BiometricSignatureData that will be written to the digital signature. May be null. This requires signature contents to be set to null.

public SignerOptions build ()

Build the SignerOptions object from the provided properties.

Returns

public SignerOptions.Builder estimatedSignatureSize (Integer estimatedSignatureSize)

Configures the signature estimated size (in bytes). The estimated size is the size that will be reserved in the PDF document before digitally signing it. This size corresponds only to the /Contents field of the signature field, that is, the signature container. The size of the signature container mostly depends on the complexity of the certificates used for digital signatures. PSPDFKit will actually reserve a bigger space to make room for implementation details (the /ByteRange field, the fact that a signature is hex-encoded in a PDF, etc.). A big estimated size will possibly make the signed document bigger than necessary, but a too small one will cause the signing process to fail.

Parameters
estimatedSignatureSize Signature size in bytes, or null to use the default size (8 KB, which will be around 16 KB in the signed PDF).

public SignerOptions.Builder signatureAppearance (SignatureAppearance signatureAppearance)

SignatureAppearance that will be used to determine how the signature looks once signing is done.

public SignerOptions.Builder signatureContents (SignatureContents signatureContents)

SignatureContents that contains raw content that will be embedded inside the "/Contents" key of a signature dictionary. This requires biometric signature data to be set to null.

public SignerOptions.Builder signatureMetadata (SignatureMetadata signatureMetadata)

SignatureMetadata that contains additional metadata to add to the signature.