public interface

SignatureStorage

com.pspdfkit.signatures.storage.SignatureStorage
Known Indirect Subclasses

Class Overview

Handles storing signatures. A signature is usually an ink signature (hand-written signature) that can be added to a PDF as an InkAnnotation. Additionally, a signature can be associated with a Signer for digitally signing a PDF.

Implement this class when creating your own signature storage, which you can then pass to the SignatureOptions.Builder. Additionally, you can use our default DatabaseSignatureStorage with your own database name.

To set a default signature storage that will be used when the SignaturePickerFragment is invoked by the framework, use setSignatureStorage(SignatureStorage).

Summary

Public Methods
abstract void addSignature(Signature signature)
Adds the given signature to the signature storage.
abstract void addSignatures(List<Signature> signatures)
Adds the given signatures to the signature storage.
abstract void clear()
Clears the storage by removing all the signatures from it.
abstract List<Signature> getSignatures()
Gets the currently stored signatures.
abstract void removeSignature(Signature signature)
Removes the given signature from the signature storage.
abstract void removeSignatures(List<Signature> signatures)
Removes the given signatures from the signature storage.

Public Methods

public abstract void addSignature (Signature signature)

Adds the given signature to the signature storage.

Parameters
signature Signature to add.
Throws
Exception being thrown if adding signature failed.

public abstract void addSignatures (List<Signature> signatures)

Adds the given signatures to the signature storage.

Parameters
signatures List of signatures to add.
Throws
Exception being thrown if adding signatures failed.

public abstract void clear ()

Clears the storage by removing all the signatures from it.

Throws
Exception being thrown if removing all signature from the storage failed.

public abstract List<Signature> getSignatures ()

Gets the currently stored signatures.

Returns
  • List of signatures currently in the storage.
Throws
Exception being thrown if retrieving signatures failed.

public abstract void removeSignature (Signature signature)

Removes the given signature from the signature storage.

Parameters
signature Signature to remove.
Throws
Exception being thrown if removing signature failed.

public abstract void removeSignatures (List<Signature> signatures)

Removes the given signatures from the signature storage.

Parameters
signatures List of signatures to remove.
Throws
Exception being thrown if removing signatures failed.