Class PdfBoxForm

java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxForm

public class PdfBoxForm extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • createForm

      public static PdfBoxForm createForm(Element e, PdfBoxPerDocumentFormState forms, PdfBoxOutputDevice od)
    • addControl

      public void addControl(PdfBoxForm.Control ctrl, String fontName)
    • processControlNames

      private void processControlNames()
      This method will create a tree of names, both non-terminal and terminal.
    • createNonTerminalFields

      private void createNonTerminalFields(PdfBoxForm.Field f, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm form)
      This method will create the non terminal fields. It is called recursively to create all non-terminal field descendants. It should be called after all the PDField objects are created.
    • createNonTerminalFields

      private void createNonTerminalFields(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm form)
      Calls createNonTerminalFields on all root non-terminal fields. Otherwise, root fields are added to the acro form field collection.
    • getColorOperator

      private static String getColorOperator(FSColor color)
      Get a PDF graphics operator for a specific color.
    • getTextareaText

      private String getTextareaText(Element e)
    • populateOptions

      private String populateOptions(Element e, List<String> labels, List<String> values, List<Integer> selectedIndices)
    • processMultiSelectControl

      private void processMultiSelectControl(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) throws IOException
      Throws:
      IOException
    • processSelectControl

      private void processSelectControl(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) throws IOException
      Processes select controls and the custom openhtmltopdf-combo control.
      Throws:
      IOException
    • processHiddenControl

      private void processHiddenControl(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) throws IOException
      Throws:
      IOException
    • processTextControl

      private void processTextControl(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) throws IOException
      Throws:
      IOException
    • createCheckboxAppearance

      public static org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream createCheckboxAppearance(PdfBoxForm.CheckboxStyle style, org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDResources resources)
      Creates a checkbox appearance stream. Uses an ordinal of the zapf dingbats font for the check mark.
    • createCheckboxAppearance

      public static org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream createCheckboxAppearance(String appear, org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDResources resources)
    • getCOSStringUTF16Encoded

      private org.apache.pdfbox.cos.COSString getCOSStringUTF16Encoded(String value)
    • processCheckboxControl

      private void processCheckboxControl(PdfBoxForm.ControlFontPair pair, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, PdfBoxForm.Control ctrl, Box root) throws IOException
      Throws:
      IOException
    • processRadioButtonGroup

      private void processRadioButtonGroup(List<PdfBoxForm.Control> group, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) throws IOException
      Throws:
      IOException
    • processSubmitControl

      private void processSubmitControl(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, PdfBoxForm.Control ctrl, Box root) throws IOException
      Throws:
      IOException
    • setPartialNameToField

      private void setPartialNameToField(PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDField field)
    • setPartialNameToField

      private static void setPartialNameToField(Element element, PdfBoxForm.Field fObj, org.apache.pdfbox.pdmodel.interactive.form.PDField field)
    • process

      public int process(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int startId, Box root) throws IOException
      Throws:
      IOException