| java.lang.Object | |
| ↳ | com.pspdfkit.signatures.signers.Signer |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Represents a signer (person and algorithm) used to digitally sign a document. Implementations of this class are, for example, MemorySigner and
Pkcs12Signer. Subclasses need to implement prepareSigningParameters(OnSigningParametersReadyCallback) which will be called by the signer
whenever a digital signing operation is initiated.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | Signer.OnSigningCompleteCallback | Called by the Signer whenever it completed digitally signing a PDF or an error occurred while trying. |
|||||||||
| interface | Signer.OnSigningParametersReadyCallback | Callback passed to prepareSigningParameters(OnSigningParametersReadyCallback) whenever a signing process was initiated and the signer needs
to load its SignatureProvider. |
|||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
Signer(String displayName)
Create the
Signer. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| final String |
getDisplayName()
Gets the display name of this signer for use in the UI.
| ||||||||||
| final void |
signFormField(SignatureFormField signatureFormField, BiometricSignatureData biometricSignatureData, OutputStream destination, Signer.OnSigningCompleteCallback callback)
This method is deprecated.
Use
signFormField(SignerOptions, OnSigningCompleteCallback) instead.
| ||||||||||
| final void |
signFormField(SignerOptions signerOptions, Signer.OnSigningCompleteCallback callback)
Signs a
SignatureFormField form element (and with that, the document). | ||||||||||
| final Completable |
signFormFieldAsync(SignatureFormField signatureFormField, BiometricSignatureData biometricSignatureData, OutputStream destination)
This method is deprecated.
Use
signFormFieldAsync(SignerOptions) instead.
| ||||||||||
| final Completable |
signFormFieldAsync(SignerOptions signerOptions)
Signs a
SignatureFormField form element (and with that, the document) asynchronously on a background thread. | ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
prepareSigningParameters(Signer.OnSigningParametersReadyCallback callback)
Called by
Signer whenever the implementation should prepare required signing parameters. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Create the Signer.
| displayName | The human readable name of this signer. |
|---|
Gets the display name of this signer for use in the UI. This is usually the name of the person that is signing the document.
This method is deprecated.
Use signFormField(SignerOptions, OnSigningCompleteCallback) instead.
Signs a SignatureFormField form element (and with that, the document).
NOTE: Signing a document requires reading it in full and will take a lot of time. Do not attempt to invoke that on main thread. Prefer to use
signFormFieldAsync(SignatureFormField, BiometricSignatureData, OutputStream) if possible.
| signatureFormField | Signature form field to be signed. |
|---|---|
| biometricSignatureData | BiometricSignatureData that will be written to the digital signature. May be null. |
| destination | Destination where the signed document will be written. @throws SigningFailedException thrown when signing has failed. |
Signs a SignatureFormField form element (and with that, the document).
NOTE: Signing a document requires reading it in full and will take a lot of time. Do not attempt to invoke that on main thread. Prefer to use
signFormFieldAsync(SignerOptions) if possible.
| signerOptions | The SignerOptions to use for signing this document.
|
|---|
This method is deprecated.
Use signFormFieldAsync(SignerOptions) instead.
Signs a SignatureFormField form element (and with that, the document) asynchronously on a background thread.
| signatureFormField | Signature form field to be signed. |
|---|---|
| biometricSignatureData | BiometricSignatureData that will be written to the digital signature. May be null. |
| destination | Destination where the signed document will be written. |
Completable that can be subscribed to.Signs a SignatureFormField form element (and with that, the document) asynchronously on a background thread.
| signerOptions | The SignerOptions to use for signing this document. |
|---|
Completable that can be subscribed to.
Called by Signer whenever the implementation should prepare required signing parameters. This is an asynchronous operation, which is completed
by the implementation handing over the signing parameters using the given Signer.OnSigningParametersReadyCallback. Signing parameters include:
SignatureProvider that implements the actual data signing logic (i.e. signing and hashing PDF data).X509Certificate that is embedded to the PDF document while signing.| callback | An Signer.OnSigningParametersReadyCallback that should be called by the implementation to hand over all required signing parameters.
|
|---|