PSPDFDocumentSignerDataSource

Objective-C

@protocol PSPDFDocumentSignerDataSource <NSObject>

Swift

protocol PDFDocumentSignerDataSource : NSObjectProtocol

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. This is the size that you expect your signature container will need in the PDF. The estimated size will be reserved in the PDF document before digitally signing it, but PSPDFKit may reserve around the double of that space to fit some implementation details. 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. This number might need to be larger depending on the size and complexity of the signing certificate chain.

    Note

    If not implemented, 32 KB will be used. The value will be clamped to the nearest even value between 0 and 256 KB (262144 bytes).

    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) -> PDFSignatureHashAlgorithm
  • 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) -> PDFSignatureEncryptionAlgorithm