Package com.openhtmltopdf.pdfboxout
Class PdfBoxForm
java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxForm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, PdfBoxForm.Field> private final List
<PdfBoxForm.ControlFontPair> private final PdfBoxPerDocumentFormState
private final Element
private final PdfBoxOutputDevice
private final Map
<String, List<PdfBoxForm.Control>> private final List
<PdfBoxForm.Control> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PdfBoxForm
(Element element, PdfBoxPerDocumentFormState forms, PdfBoxOutputDevice od) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addControl
(PdfBoxForm.Control ctrl, String fontName) 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.static org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream
createCheckboxAppearance
(String appear, org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDResources resources) static PdfBoxForm
createForm
(Element e, PdfBoxPerDocumentFormState forms, PdfBoxOutputDevice od) private void
createNonTerminalFields
(PdfBoxForm.Field f, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm form) This method will create the non terminal fields.private void
createNonTerminalFields
(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm form) Calls createNonTerminalFields on all root non-terminal fields.private static String
getColorOperator
(FSColor color) Get a PDF graphics operator for a specific color.private org.apache.pdfbox.cos.COSString
getCOSStringUTF16Encoded
(String value) private String
private String
int
private void
processCheckboxControl
(PdfBoxForm.ControlFontPair pair, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, PdfBoxForm.Control ctrl, Box root) private void
This method will create a tree of names, both non-terminal and terminal.private void
processHiddenControl
(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) private void
processMultiSelectControl
(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) private void
processRadioButtonGroup
(List<PdfBoxForm.Control> group, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) private void
processSelectControl
(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) Processes select controls and the custom openhtmltopdf-combo control.private void
processSubmitControl
(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, PdfBoxForm.Control ctrl, Box root) private void
processTextControl
(PdfBoxForm.ControlFontPair pair, PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acro, int i, Box root) private void
setPartialNameToField
(PdfBoxForm.Control ctrl, org.apache.pdfbox.pdmodel.interactive.form.PDField field) private static void
setPartialNameToField
(Element element, PdfBoxForm.Field fObj, org.apache.pdfbox.pdmodel.interactive.form.PDField field)
-
Field Details
-
docFormsStateContainer
-
od
-
element
-
controls
-
submits
-
radioGroups
-
allFieldMap
-
-
Constructor Details
-
PdfBoxForm
-
-
Method Details
-
createForm
public static PdfBoxForm createForm(Element e, PdfBoxPerDocumentFormState forms, PdfBoxOutputDevice od) -
addControl
-
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
Get a PDF graphics operator for a specific color. -
getTextareaText
-
populateOptions
-
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
-
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
-