Class PdfFormField


public class PdfFormField extends PdfAnnotation
Implements form fields.
  • Field Details

  • Constructor Details

    • PdfFormField

      public PdfFormField(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action)
      Constructs a new PdfAnnotation of subtype link (Action).
      Parameters:
      writer - the PdfWriter
      llx - lower-left x-coordinated
      lly - lower-left y-coordinate
      urx - upper-right x-coordinate
      ury - upper-right y-coordinate
      action - the PdfAction
    • PdfFormField

      protected PdfFormField(PdfWriter writer)
      Creates new PdfFormField
      Parameters:
      writer - the PdfWriter to associated to the PdfFormField
  • Method Details

    • createEmpty

      public static PdfFormField createEmpty(PdfWriter writer)
    • createButton

      protected static PdfFormField createButton(PdfWriter writer, int flags)
    • createPushButton

      public static PdfFormField createPushButton(PdfWriter writer)
    • createCheckBox

      public static PdfFormField createCheckBox(PdfWriter writer)
    • createRadioButton

      public static PdfFormField createRadioButton(PdfWriter writer, boolean noToggleToOff)
    • createTextField

      public static PdfFormField createTextField(PdfWriter writer, boolean multiline, boolean password, int maxLen)
    • createTextField

      public static PdfFormField createTextField(PdfWriter writer)
      Allows creation of a simple textfield.
      Parameters:
      writer - pdf writer object
      Returns:
      PdfFormField the created textfield
    • createChoice

      protected static PdfFormField createChoice(PdfWriter writer, int flags, PdfArray options, int topIndex)
    • createList

      public static PdfFormField createList(PdfWriter writer, String[] options, int topIndex)
    • createList

      public static PdfFormField createList(PdfWriter writer, String[][] options, int topIndex)
    • createCombo

      public static PdfFormField createCombo(PdfWriter writer, boolean edit, String[] options, int topIndex)
    • createCombo

      public static PdfFormField createCombo(PdfWriter writer, boolean edit, String[][] options, int topIndex)
    • processOptions

      protected static PdfArray processOptions(String[] options)
    • processOptions

      protected static PdfArray processOptions(String[][] options)
    • createSignature

      public static PdfFormField createSignature(PdfWriter writer)
    • mergeResources

      static void mergeResources(PdfDictionary result, PdfDictionary source, PdfStamperImp writer)
    • mergeResources

      static void mergeResources(PdfDictionary result, PdfDictionary source)
    • shallowDuplicate

      public static PdfAnnotation shallowDuplicate(PdfAnnotation annot)
    • setWidget

      public void setWidget(Rectangle rect, PdfName highlight)
    • setButton

      public void setButton(int flags)
    • getParent

      public PdfFormField getParent()
      Getter for property parent.
      Returns:
      Value of property parent.
    • addKid

      public void addKid(PdfFormField field)
    • getKidFields

      public List<PdfFormField> getKidFields()
    • setFieldFlags

      public int setFieldFlags(int flags)
    • setValueAsString

      public void setValueAsString(String s)
    • setValueAsName

      public void setValueAsName(String s)
    • setValue

      public void setValue(PdfSignature sig)
    • setDefaultValueAsString

      public void setDefaultValueAsString(String s)
    • setDefaultValueAsName

      public void setDefaultValueAsName(String s)
    • setFieldName

      public void setFieldName(String s)
    • setUserName

      public void setUserName(String s)
    • setMappingName

      public void setMappingName(String s)
    • setQuadding

      public void setQuadding(int v)
    • setUsed

      public void setUsed()
      Description copied from class: PdfAnnotation
      Setter for property used.
      Overrides:
      setUsed in class PdfAnnotation