Class PdfSignatureAppearance

java.lang.Object
com.itextpdf.signatures.PdfSignatureAppearance

public class PdfSignatureAppearance extends Object
Provides convenient methods to make a signature appearance. Use it in conjunction with PdfSigner.
  • Field Details

    • document

      private final PdfDocument document
      The document to be signed.
    • modelElement

      private SignatureFieldAppearance modelElement
      Signature model element.
    • page

      private int page
      The page where the signature will appear.
    • rect

      private Rectangle rect
      The coordinates of the rectangle for a visible signature, or a zero-width, zero-height rectangle for an invisible signature.
    • pageRect

      private Rectangle pageRect
      Rectangle that represent the position and dimension of the signature in the page.
    • renderingMode

      private PdfSignatureAppearance.RenderingMode renderingMode
      The rendering mode chosen for visible signatures.
    • reason

      private String reason
      The reason for signing.
    • reasonCaption

      private String reasonCaption
      The caption for the reason for signing.
    • location

      private String location
      Holds value of property location.
    • locationCaption

      private String locationCaption
      The caption for the location of signing.
    • signatureCreator

      private String signatureCreator
      Holds value of the application that creates the signature.
    • contact

      private String contact
      The contact name of the signer.
    • signDate

      private Calendar signDate
      Holds value of property signDate.
    • signCertificate

      private Certificate signCertificate
      The signing certificate.
    • signatureGraphic

      private ImageData signatureGraphic
      The image that needs to be used for a visible signature.
    • image

      private ImageData image
      A background image for the text in layer 2.
    • imageScale

      private float imageScale
      The scaling to be applied to the background image.
    • description

      private String description
      The text that goes in Layer 2 of the signature appearance.
    • font

      private PdfFont font
      Font for the text in Layer 2.
    • fontProvider

      private FontProvider fontProvider
      Font provider for the text.
    • fontFamilyNames

      private String[] fontFamilyNames
      Font family for the text.
    • fontSize

      private float fontSize
      Font size for the font of Layer 2.
    • fontColor

      private Color fontColor
      Font color for the font of Layer 2.
    • n0

      private PdfFormXObject n0
      Zero level of the signature appearance.
    • n2

      private PdfFormXObject n2
      Second level of the signature appearance.
    • fieldName

      private String fieldName
      Indicates the field to be signed.
    • reuseAppearance

      private boolean reuseAppearance
      Indicates if we need to reuse the existing appearance as layer 0.
    • reuseAppearanceSet

      private boolean reuseAppearanceSet
  • Constructor Details

    • PdfSignatureAppearance

      protected PdfSignatureAppearance(PdfDocument document, Rectangle pageRect, int pageNumber)
      Creates a PdfSignatureAppearance.
      Parameters:
      document - PdfDocument
      pageRect - Rectangle of the appearance
      pageNumber - Number of the page the appearance should be on
  • Method Details