PSPDFPKCS12Signer


@interface PSPDFPKCS12Signer : PSPDFSigner

Concrete implementation of a PSPDFSigner where filter is Adobe.PPKLite and subFilter is adbe.pkcs7.detached.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12Signer : PSPDFSigner
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12Signer : PSPDFSigner
  • Creates a new PKCS12 signer with the specified display name. The certificate and private key should be contained in p12.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDisplayName:(nonnull NSString *)displayName
                                         PKCS12:(nonnull PSPDFPKCS12 *)p12;

    Swift

    init(displayName: String, pkcs12 p12: PSPDFPKCS12)
  • The signer display name. This name is shown on the signature UI.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull displayName;

    Swift

    var displayName: String { get }
  • The reason for the signature.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull reason;

    Swift

    var reason: String { get set }
  • The location for the signature.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull location;

    Swift

    var location: String { get set }
  • p12

    The PKCS12 container holding the private key and certificate.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFPKCS12 *_Nonnull p12;

    Swift

    var p12: PSPDFPKCS12 { get }
  • Private key from the certificate used to produce the signature by encrypting the message digest from the PDF file. (see details https://pspdfkit.com/guides/ios/current/features/digital-signatures/ )

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) PSPDFPrivateKey *privateKey;

    Swift

    var privateKey: PSPDFPrivateKey? { get set }
  • Signs the passed form element |elem| using provided password to open the p12 container (to get the certificate and the private key) and writes the signed document to |path|. Returns YES for |success|, NO otherwise and error |err| is set.

    Declaration

    Objective-C

    - (void)signFormElement:(nonnull PSPDFSignatureFormElement *)element
              usingPassword:(nonnull NSString *)password
                    writeTo:(nonnull NSString *)path
                 completion:(nullable void (^)(BOOL, PSPDFDocument *_Nonnull,
                                               NSError *_Nullable))completionBlock;

    Swift

    func sign(_ element: PSPDFSignatureFormElement, usingPassword password: String, writeTo path: String, completion completionBlock: ((Bool, PSPDFDocument, Error?) -> Void)? = nil)

    Parameters

    element

    The signature form element to sign.

    password

    The password to unlock the p12 container.

    path

    The destination path for the signed document.

  • Signs the passed form element |elem| using provided password to open the p12 container (to get the certificate and the private key) and writes the signed document to |path|. Returns YES for |success|, NO otherwise and error |err| is set.

    Declaration

    Objective-C

    - (void)signFormElement:(nonnull PSPDFSignatureFormElement *)element
              usingPassword:(nonnull NSString *)password
                    writeTo:(nonnull NSString *)path
                 appearance:(nullable PSPDFSignatureAppearance *)signatureAppearance
        biometricProperties:
            (nullable PSPDFSignatureBiometricProperties *)biometricProperties
                 completion:(nullable void (^)(BOOL, PSPDFDocument *_Nonnull,
                                               NSError *_Nullable))completionBlock;

    Swift

    func sign(_ element: PSPDFSignatureFormElement, usingPassword password: String, writeTo path: String, appearance signatureAppearance: PSPDFSignatureAppearance?, biometricProperties: PSPDFSignatureBiometricProperties?, completion completionBlock: ((Bool, PSPDFDocument, Error?) -> Void)? = nil)

    Parameters

    element

    The signature form element to sign.

    password

    The password to unlock the p12 container.

    path

    The destination path for the signed document.

    signatureAppearance

    The PSPDFSignatureAppearance instance that customizes how the signature will appear in the signed document. If nil, the default signature appearance will be used.

    biometricProperties
    The `PSPDFSignatureBiometricProperties` instance that adds enhanced security properties to the signature,
    

    like input pressure, type, etc.