Class FDFField
java.lang.Object
org.apache.pdfbox.pdmodel.fdf.FDFField
- All Implemented Interfaces:
COSObjectable
This represents an FDF field that is part of the FDF document.
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionFDFField()Default constructor.Constructor.This will create an FDF field from an XFDF XML document. -
Method Summary
Modifier and TypeMethodDescriptionThis will get the action that is associated with this field.This will get a list of additional actions that will get executed based on events.This will get the appearance dictionary that specifies the appearance of a pushbutton field.This will get named page references..This will get the ClrFf entry of the cos dictionary.This will get the ClrF entry of the cos dictionary.Convert this standard java object to a COS object.Returns the COS value of this field.This will get the Ff entry of the cos dictionary.This will get the icon fit that is associated with this field.getKids()This will get the list of kids.This will return a list of options for a choice field.This will get the "T" entry in the field dictionary.This will set the rich text that is associated with this field.This will get the SetFf entry of the cos dictionary.This will get the SetF entry of the cos dictionary.getValue()This will get the value for the field.This will get the F entry of the cos dictionary.voidThis will set the action that is associated with this field.voidThis will set the additional actions that are associated with this field.voidThis will set the appearance dictionary.voidThis will set the named page references.voidsetClearFieldFlags(int ff) This will get the field flags that are associated with this field.voidThis will get the field flags that are associated with this field.voidsetClearWidgetFieldFlags(int ff) This will get the field flags that are associated with this field.voidThis will get the field flags that are associated with this field.voidsetFieldFlags(int ff) This will get the field flags that are associated with this field.voidsetFieldFlags(Integer ff) This will get the field flags that are associated with this field.voidsetIconFit(FDFIconFit fit) This will set the icon fit entry.voidThis will set the list of kids.voidsetOptions(List<Object> options) This will set the options for the choice field.voidsetPartialFieldName(String partial) This will set the partial field name.voidsetRichText(COSStream rv) This will set the rich text value.voidsetRichText(COSString rv) This will set the rich text value.voidsetSetFieldFlags(int ff) This will get the field flags that are associated with this field.voidThis will get the field flags that are associated with this field.voidsetSetWidgetFieldFlags(int ff) This will get the widget field flags that are associated with this field.voidThis will get the widget field flags that are associated with this field.voidYou should pass in a string, or a java.util.List of strings to set the value.voidSets the COS value of this field.voidsetWidgetFieldFlags(int f) This will get the field flags that are associated with this field.voidThis will get the widget field flags that are associated with this field.voidThis will write this element as an XML document.
-
Constructor Details
-
FDFField
public FDFField()Default constructor. -
FDFField
-
FDFField
This will create an FDF field from an XFDF XML document.- Parameters:
fieldXML- The XML document that contains the XFDF data.- Throws:
IOException- If there is an error reading from the dom.
-
-
Method Details
-
writeXML
This will write this element as an XML document.- Parameters:
output- The stream to write the xml to.- Throws:
IOException- If there is an error writing the XML.
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The cos object that matches this Java object.
-
getKids
-
setKids
-
getPartialFieldName
This will get the "T" entry in the field dictionary. A partial field name. Where the fully qualified field name is a concatenation of the parent's fully qualified field name and "." as a separator. For example
Address.State
Address.City- Returns:
- The partial field name.
-
setPartialFieldName
This will set the partial field name.- Parameters:
partial- The partial field name.
-
getValue
This will get the value for the field. This will return type will either be
String : Checkboxes, Radio Button, Textfields
java.util.List of strings: Choice Field- Returns:
- The value of the field.
- Throws:
IOException- If there is an error getting the value.
-
getCOSValue
Returns the COS value of this field.- Returns:
- The COS value of the field.
- Throws:
IOException- If there is an error getting the value.
-
setValue
You should pass in a string, or a java.util.List of strings to set the value.- Parameters:
value- The value that should populate when imported.- Throws:
IOException- If there is an error setting the value.
-
setValue
Sets the COS value of this field.- Parameters:
value- COS value.
-
getFieldFlags
This will get the Ff entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The field flags.
-
setFieldFlags
This will get the field flags that are associated with this field. The Ff entry in the FDF field dictionary.- Parameters:
ff- The new value for the field flags.
-
setFieldFlags
public void setFieldFlags(int ff) This will get the field flags that are associated with this field. The Ff entry in the FDF field dictionary.- Parameters:
ff- The new value for the field flags.
-
getSetFieldFlags
This will get the SetFf entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The field flags.
-
setSetFieldFlags
This will get the field flags that are associated with this field. The SetFf entry in the FDF field dictionary.- Parameters:
ff- The new value for the "set field flags".
-
setSetFieldFlags
public void setSetFieldFlags(int ff) This will get the field flags that are associated with this field. The SetFf entry in the FDF field dictionary.- Parameters:
ff- The new value for the "set field flags".
-
getClearFieldFlags
This will get the ClrFf entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The field flags.
-
setClearFieldFlags
This will get the field flags that are associated with this field. The ClrFf entry in the FDF field dictionary.- Parameters:
ff- The new value for the "clear field flags".
-
setClearFieldFlags
public void setClearFieldFlags(int ff) This will get the field flags that are associated with this field. The ClrFf entry in the FDF field dictionary.- Parameters:
ff- The new value for the "clear field flags".
-
getWidgetFieldFlags
This will get the F entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The widget field flags.
-
setWidgetFieldFlags
This will get the widget field flags that are associated with this field. The F entry in the FDF field dictionary.- Parameters:
f- The new value for the field flags.
-
setWidgetFieldFlags
public void setWidgetFieldFlags(int f) This will get the field flags that are associated with this field. The F entry in the FDF field dictionary.- Parameters:
f- The new value for the field flags.
-
getSetWidgetFieldFlags
This will get the SetF entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The field flags.
-
setSetWidgetFieldFlags
This will get the widget field flags that are associated with this field. The SetF entry in the FDF field dictionary.- Parameters:
ff- The new value for the "set widget field flags".
-
setSetWidgetFieldFlags
public void setSetWidgetFieldFlags(int ff) This will get the widget field flags that are associated with this field. The SetF entry in the FDF field dictionary.- Parameters:
ff- The new value for the "set widget field flags".
-
getClearWidgetFieldFlags
This will get the ClrF entry of the cos dictionary. If it it not present then this method will return null.- Returns:
- The widget field flags.
-
setClearWidgetFieldFlags
This will get the field flags that are associated with this field. The ClrF entry in the FDF field dictionary.- Parameters:
ff- The new value for the "clear widget field flags".
-
setClearWidgetFieldFlags
public void setClearWidgetFieldFlags(int ff) This will get the field flags that are associated with this field. The ClrF entry in the FDF field dictionary.- Parameters:
ff- The new value for the "clear field flags".
-
getAppearanceDictionary
This will get the appearance dictionary that specifies the appearance of a pushbutton field.- Returns:
- The AP entry of this dictionary.
-
setAppearanceDictionary
This will set the appearance dictionary.- Parameters:
ap- The appearance dictionary.
-
getAppearanceStreamReference
This will get named page references..- Returns:
- The named page references.
-
setAppearanceStreamReference
This will set the named page references.- Parameters:
ref- The named page references.
-
getIconFit
This will get the icon fit that is associated with this field.- Returns:
- The IF entry.
-
setIconFit
This will set the icon fit entry.- Parameters:
fit- The icon fit object.
-
getOptions
-
setOptions
-
getAction
This will get the action that is associated with this field.- Returns:
- The A entry in the field dictionary.
-
setAction
This will set the action that is associated with this field.- Parameters:
a- The new action.
-
getAdditionalActions
This will get a list of additional actions that will get executed based on events.- Returns:
- The AA entry in this field dictionary.
-
setAdditionalActions
This will set the additional actions that are associated with this field.- Parameters:
aa- The additional actions.
-
getRichText
This will set the rich text that is associated with this field.- Returns:
- The rich text XHTML stream.
-
setRichText
This will set the rich text value.- Parameters:
rv- The rich text value for the stream.
-
setRichText
This will set the rich text value.- Parameters:
rv- The rich text value for the stream.
-