Class PdfAppearance


public class PdfAppearance extends PdfTemplate
Implements the appearance stream to be used with form fields..
  • Field Details

  • Constructor Details

    • PdfAppearance

      PdfAppearance()
      Creates a PdfAppearance.
    • PdfAppearance

      PdfAppearance(PdfIndirectReference iref)
    • PdfAppearance

      PdfAppearance(PdfWriter wr)
      Creates new PdfTemplate
      Parameters:
      wr - the PdfWriter
  • Method Details

    • createAppearance

      public static PdfAppearance createAppearance(PdfWriter writer, float width, float height)
      Creates a new appearance to be used with form fields.
      Parameters:
      writer - the PdfWriter to use
      width - the bounding box width
      height - the bounding box height
      Returns:
      the appearance created
    • createAppearance

      private static PdfAppearance createAppearance(PdfWriter writer, float width, float height, PdfName forcedName)
    • createAppearance

      public static PdfAppearance createAppearance(PdfWriter writer, float width, float height, PdfIndirectReference ref)
      Creates a new appearance to be used with existing form fields. (Create an empty signature appearance with an existing reference).
      Parameters:
      writer - the PdfWriter to use
      width - the bounding box width
      height - the bounding box height
      ref - to be overwritten
      Returns:
      the created appearance
    • setFontAndSize

      public void setFontAndSize(BaseFont bf, float size)
      Set the font and the size for the subsequent text writing.
      Overrides:
      setFontAndSize in class PdfContentByte
      Parameters:
      bf - the font
      size - the font size in points
    • getDuplicate

      public PdfContentByte getDuplicate()
      Description copied from class: PdfTemplate
      Gets a duplicate of this PdfTemplate. All the members are copied by reference but the buffer stays different.
      Overrides:
      getDuplicate in class PdfTemplate
      Returns:
      a copy of this PdfTemplate