com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class SignatureField

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.ICollection, com.aspose.ms.System.Collections.IEnumerable, com.aspose.ms.System.ICloneable, Cloneable, Iterable


    public final class SignatureField
    extends Field

    Represents signature form field.

    • Constructor Detail

      • SignatureField

        public SignatureField(Page page,
                      Rectangle rect)

        Initializes new instance of the SignatureField class.

        Parameters:
        page - Page where signature field should be placed.
        rect - Position and size of signature field.
      • SignatureField

        public SignatureField(IDocument doc,
                      Rectangle rect)

        Initializes new instance of the SignatureField class.

        Parameters:
        doc - Page where signature field should be placed.
        rect - Position and size of signature field.
    • Method Detail

      • getSignature

        public Signature getSignature()

        Gets signature object. This object contains signature data regarding public-key cryptographic standards. Classes PKCS1, PKCS7 and PKCS7Detached represent all supported types of signature objects.

        Returns:
        Signature object
      • sign

        public void sign(Signature signature,
                InputStream pfx,
                String pass)

        Signs the document using this signature field.

        Parameters:
        signature - Signature object, see PKCS1, PKCS7, PKCS7Detached.
        pfx - Stream with certificate.
        pass - Password to access private in the pfx.
      • sign

        public void sign(Signature signature)

        Sign the document using this signature field.

        Parameters:
        signature - Signature object, see PKCS1, PKCS7 and PKCS7Detached.
      • clear

        public void clear()

        Removes signature object from field.

      • extractImage

        public InputStream extractImage()

        Extracts signature's image.

        Returns:
        If image was successfully found than returns stream object; otherwise, null.
      • extractCertificate

        public InputStream extractCertificate()

        Extracts the single X.509 certificate in DER format as a stream.

        Returns:
        If certificate was found returns X.509 single certificate; otherwise, null.