Class PdfFormField

    • Constructor Detail

      • PdfFormField

        public PdfFormField​(PdfWriter writer,
                            float llx,
                            float lly,
                            float urx,
                            float ury,
                            PdfAction action)
        Constructs a new PdfAnnotation of subtype link (Action).
      • PdfFormField

        protected PdfFormField​(PdfWriter writer)
        Creates new PdfFormField
    • Method Detail

      • setButton

        public void setButton​(int flags)
      • createRadioButton

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

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

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

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

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

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

        protected static PdfArray processOptions​(java.lang.String[] options)
      • processOptions

        protected static PdfArray processOptions​(java.lang.String[][] options)
      • getParent

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

        public java.util.ArrayList<PdfFormField> getKids()
      • setFieldFlags

        public int setFieldFlags​(int flags)
        ORs together the given flags with the current /Ff value.
        Parameters:
        flags - flags to be added.
        Returns:
        the old flag value
      • setValueAsString

        public void setValueAsString​(java.lang.String s)
      • setValueAsName

        public void setValueAsName​(java.lang.String s)
      • setRichValue

        public void setRichValue​(java.lang.String rv)
        Sets the rich value for this field. It is suggested that the regular value of this field be set to an equivalent value. Rich text values are only supported since PDF 1.5, and require that the FF_RV flag be set. See PDF Reference chapter 12.7.3.4 for details.
        Parameters:
        rv - HTML markup for the rich value of this field
        Since:
        5.0.6
      • setDefaultValueAsString

        public void setDefaultValueAsString​(java.lang.String s)
      • setDefaultValueAsName

        public void setDefaultValueAsName​(java.lang.String s)
      • setFieldName

        public void setFieldName​(java.lang.String s)
      • setUserName

        public void setUserName​(java.lang.String s)
        The "user name" is the text shown as a tool.
        Parameters:
        s - user name.
      • setMappingName

        public void setMappingName​(java.lang.String s)
        The mapping name is the name this field uses when submitting form data.
        Parameters:
        s -
      • setQuadding

        public void setQuadding​(int v)
        Sets text alginment for this field
        Parameters:
        v - one of the Q_* contstants