Class PdfSignatureFormField


public class PdfSignatureFormField extends PdfFormField
An AcroForm field containing signature data.
  • Constructor Details

  • Method Details

    • getFormType

      public PdfName getFormType()
      Returns Sig, the form type for signature form fields.
      Overrides:
      getFormType in class PdfFormField
      Returns:
      the form type, as a PdfName
    • setValue

      public PdfSignatureFormField setValue (PdfObject value)
      Adds the signature to the signature field.
      Parameters:
      value - the signature to be contained in the signature field, or an indirect reference to it
      Returns:
      the edited field
    • getSigFieldLockDictionary

      public PdfSigFieldLock getSigFieldLockDictionary()
      Gets the PdfSigFieldLock, which contains fields that must be locked if the document is signed.
      Returns:
      a dictionary containing locked fields.
      See Also:
    • setBackgroundLayer

      public PdfSignatureFormField setBackgroundLayer (PdfFormXObject n0)
      Sets the background layer that is present when creating the signature field.
      Parameters:
      n0 - layer xObject.
      Returns:
      this same PdfSignatureFormField instance.
    • setSignatureAppearanceLayer

      public PdfSignatureFormField setSignatureAppearanceLayer (PdfFormXObject n2)
      Sets the signature appearance layer that contains information about the signature, e.g. the line art for the handwritten signature, the text giving the signer’s name, date, reason, location and so on.
      Parameters:
      n2 - layer xObject.
      Returns:
      this same PdfSignatureFormField instance.
    • setReuseAppearance

      public PdfSignatureFormField setReuseAppearance (boolean reuseAppearance)
      Indicates that the existing appearances needs to be reused as a background.
      Parameters:
      reuseAppearance - is an appearances reusing flag value to set.
      Returns:
      this same PdfSignatureFormField instance.
    • setIgnorePageRotation

      @Deprecated public PdfSignatureFormField setIgnorePageRotation (boolean ignore)
      Deprecated.
      Functionality is deprecated, see documentation for more information.
      Sets the boolean value which indicates if page rotation should be ignored for the signature appearance.

      Default value is true.

      If you have rotated pages but want to ignore that rotation when adding a new field, you need to disable this broken feature and negate page rotation by modifying form field rectangle and field rotation properties using PdfFormAnnotation.setRotation(int). An example code explaining how to do it can be found in SignatureAppearancePageRotationAgnosticExample sample in Java samples repository and C# samples repository.

      Parameters:
      ignore - boolean value to set
      Returns:
      this same PdfSignatureFormField instance