PSPDFDocumentSignerDataSource

@protocol PSPDFDocumentSignerDataSource <NSObject>

A data source that, when configured on a PSPDFSigner instance or one of its subclasses, gives implementors a chance to configure some details of a digital signature.

  • Gives the implementor a chance to configure the signature appearance for a form field.

    Note

    If not implemented, PSPDFSignatureAppearance.defaultConfiguration will be used.

    Declaration

    Objective-C

    - (nonnull PSPDFSignatureAppearance *)
         documentSigner:(nonnull PSPDFSigner *)signer
    signatureAppearance:(nonnull NSString *)formFieldFqn;

    Swift

    optional func documentSigner(_ signer: PSPDFSigner, signatureAppearance formFieldFqn: String) -> PSPDFSignatureAppearance
  • Gives the implementor a chance to configure the signature estimated size (in bytes) for a form field. The estimated size is the size that will be reserved in the PDF document before digitally signing it. 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. We recommend reserving around 16 KB. This number may need to be greater depending on the size of the signing certificate. Use with caution.

    Note

    If not implemented, 16 KB will be used.

    Declaration

    Objective-C

    - (int32_t)documentSigner:(nonnull PSPDFSigner *)signer
        signatureEstimatedSize:(nonnull NSString *)formFieldFqn;

    Swift

    optional func documentSigner(_ signer: PSPDFSigner, signatureEstimatedSize formFieldFqn: String) -> Int32
  • Gives the implementor a chance to configure biometric properties for this signature. Biometric properties are optional metadata that will be stored encrypted inside the signature dictionary.

    Note

    If not implemented, no biometric properties will be embedded.

    Declaration

    Objective-C

    - (nonnull PSPDFSignatureBiometricProperties *)
                  documentSigner:(nonnull PSPDFSigner *)signer
    signatureBiometricProperties:(nonnull NSString *)formFieldFqn;

    Swift

    optional func documentSigner(_ signer: PSPDFSigner, signatureBiometricProperties formFieldFqn: String) -> PSPDFSignatureBiometricProperties
  • Gives the implementor a chance to select a digest algorithm for the signature.

    Note

    If not implemented, SHA256 will be used.

    Declaration

    Objective-C

    - (PSPDFSignatureHashAlgorithm)documentSigner:(nonnull PSPDFSigner *)signer
                           signatureHashAlgorithm:(nonnull NSString *)formFieldFqn;

    Swift

    optional func documentSigner(_ signer: PSPDFSigner, signatureHashAlgorithm formFieldFqn: String) -> PSPDFSignatureHashAlgorithm
  • Gives the implementor a chance to select an encryption algorithm for the signature.

    Note

    If not implemented, RSA will be used.

    Declaration

    Objective-C

    - (PSPDFSignatureEncryptionAlgorithm)
                  documentSigner:(nonnull PSPDFSigner *)signer
    signatureEncryptionAlgorithm:(nonnull NSString *)formFieldFqn;

    Swift

    optional func documentSigner(_ signer: PSPDFSigner, signatureEncryptionAlgorithm formFieldFqn: String) -> PSPDFSignatureEncryptionAlgorithm