Field

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.WidgetAnnotation

All Implemented Interfaces: java.lang.Iterable, java.lang.Cloneable

public class Field extends WidgetAnnotation implements Iterable<WidgetAnnotation>, Cloneable

Base class for acro form fields.

Constructors

ConstructorDescription
Field(IDocument doc)Creates field for use in Generator.

Fields

FieldDescription
_Password_Password
_FileSelect_FileSelect

Methods

MethodDescription
getPartialName()Gets partial name of the field.
setPartialName(String value)Sets partial name of the field.
getAlternateName()Gets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface).
setAlternateName(String value)Sets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface).
getMappingName()Gets mapping name of the field that shall be used when exporting interactive form field data from the document.
setMappingName(String value)Sets mapping name of the field that shall be used when exporting interactive form field data from the document.
recalculate()Recaculates all calculated fields on the form.
getValue()Gets value of the field.
setValue(String value)Set value.
isSynchronized()Returns true if dictionary is synchronized.
size()Gets number of subfields in this field.
getSyncRoot()Synchronization object.
isGroup()Gets boolean value which indicates is this field non-terminal field i.e.
copyTo(Field[] array, int index)Copies subfields of this field into array starting from specified index.
copyTo_Rename_Namesake(WidgetAnnotation[] array, int index)Copies subfields of this field into array starting from specified index.
iterator()Returns enumerator of contained fields.
flatten()Removes this field and place its value directly on the page.
get_Item(String name)Gets subfield contained in this field by name of the subfield.
get_Item(int index)Gets subfield contained in this field by index.
setPosition(Point point)Set position of the field.
updateAppearances()Update appearances value.
getAnnotationIndex()Gets index of this anotation on the page.
setAnnotationIndex(int value)Sets index of this anotation on the page.
getPageIndex()Gets index of page which contains this field.
getRect()Gets the field rectangle.
setRect(Rectangle value)Sets the field rectangle.
isSharedField()Property for Generator support.
setSharedField(boolean value)Property for Generator support.
isFitIntoRectangle()If true then font size will reduced to fit text to specified rectangle.
setFitIntoRectangle(boolean value)If true then font size will reduced to fit text to specified rectangle.
getMaxFontSize()Maximal font size which can be used for field contents.
setMaxFontSize(double value)Maximal font size which can be used for field contents.
getMinFontSize()Minimal font size which can be used for field contents.
setMinFontSize(double value)Minimal font size which can be used for field contents.
getTabOrder()Gets or sets tab order of the field.
setTabOrder(int value)Gets or sets tab order of the field.
add(WidgetAnnotation item)
clear()
contains(WidgetAnnotation item)
copyTo(WidgetAnnotation[] array, int arrayIndex)
isReadOnly()
remove(WidgetAnnotation item)

Field(IDocument doc)

public Field(IDocument doc)

Creates field for use in Generator.

Parameters:

ParameterTypeDescription
docIDocumentDocument where field will be created.

_Password

public static final int _Password

_Password

_FileSelect

public static final int _FileSelect

_FileSelect

getPartialName()

public String getPartialName()

Gets partial name of the field.

Returns: java.lang.String - String value

setPartialName(String value)

public void setPartialName(String value)

Sets partial name of the field.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

getAlternateName()

public String getAlternateName()

Gets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface). Alternate name is used as field tooltip in Adobe Acrobat.

Returns: java.lang.String - String value

setAlternateName(String value)

public void setAlternateName(String value)

Sets alternate name of the field (An alternate field name that shall be used in place of the actual field name wherever the field shall be identified in the user interface). Alternate name is used as field tooltip in Adobe Acrobat.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

getMappingName()

public String getMappingName()

Gets mapping name of the field that shall be used when exporting interactive form field data from the document.

Returns: java.lang.String - String value

setMappingName(String value)

public void setMappingName(String value)

Sets mapping name of the field that shall be used when exporting interactive form field data from the document.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

recalculate()

public boolean recalculate()

Recaculates all calculated fields on the form.

Returns: boolean - true if field value was changed during recalculation.

getValue()

public String getValue()

Gets value of the field.

Returns: java.lang.String - String value

setValue(String value)

public void setValue(String value)

Set value.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString value

isSynchronized()

public boolean isSynchronized()

Returns true if dictionary is synchronized.

Returns: boolean - boolean value

size()

public int size()

Gets number of subfields in this field. (For example number of items in radio button field).

Returns: int - int value

getSyncRoot()

public Object getSyncRoot()

Synchronization object.

Returns: java.lang.Object - object value

isGroup()

public boolean isGroup()

Gets boolean value which indicates is this field non-terminal field i.e. group of fields.

Returns: boolean - boolean value

copyTo(Field[] array, int index)

public void copyTo(Field[] array, int index)

Copies subfields of this field into array starting from specified index.

Parameters:

ParameterTypeDescription
arrayField[]Array where field must be copied.
indexintStarting index where fields will be copied.

copyTo_Rename_Namesake(WidgetAnnotation[] array, int index)

public final void copyTo_Rename_Namesake(WidgetAnnotation[] array, int index)

Copies subfields of this field into array starting from specified index.

Parameters:

ParameterTypeDescription
arrayWidgetAnnotation[]Array where field must be copied.
indexintStarting index where fields will be copied.

iterator()

public Iterator<WidgetAnnotation> iterator()

Returns enumerator of contained fields.

Returns: java.util.Iterator<com.aspose.pdf.WidgetAnnotation> - Enumerator object.

flatten()

public void flatten()

Removes this field and place its value directly on the page.

get_Item(String name)

public WidgetAnnotation get_Item(String name)

Gets subfield contained in this field by name of the subfield.

Parameters:

ParameterTypeDescription
namejava.lang.StringContained subfield name.

Returns: WidgetAnnotation - Field instance.

get_Item(int index)

public WidgetAnnotation get_Item(int index)

Gets subfield contained in this field by index.

Parameters:

ParameterTypeDescription
indexintIndex of the reuqested subfield.

Returns: WidgetAnnotation - Field instance.

setPosition(Point point)

public void setPosition(Point point)

Set position of the field.

Parameters:

ParameterTypeDescription
pointPointPoint where field should be positioned.

updateAppearances()

public void updateAppearances()

Update appearances value.

getAnnotationIndex()

public int getAnnotationIndex()

Gets index of this anotation on the page.

Returns: int - int value

setAnnotationIndex(int value)

public void setAnnotationIndex(int value)

Sets index of this anotation on the page.

Parameters:

ParameterTypeDescription
valueintint value

getPageIndex()

public int getPageIndex()

Gets index of page which contains this field.

Returns: int - int value

getRect()

public Rectangle getRect()

Gets the field rectangle.

Returns: Rectangle - the field rectangle.

setRect(Rectangle value)

public void setRect(Rectangle value)

Sets the field rectangle.

Parameters:

ParameterTypeDescription
valueRectanglethe field rectangle.

isSharedField()

public boolean isSharedField()

Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it’s appearance will be visible on all pages of the document. If false, separated field will be created for every document page.

Returns: boolean - boolean value

setSharedField(boolean value)

public void setSharedField(boolean value)

Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it’s appearance will be visible on all pages of the document. If false, separated field will be created for every document page.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

isFitIntoRectangle()

public static synchronized boolean isFitIntoRectangle()

If true then font size will reduced to fit text to specified rectangle.

Returns: boolean - boolean value

setFitIntoRectangle(boolean value)

public static synchronized void setFitIntoRectangle(boolean value)

If true then font size will reduced to fit text to specified rectangle.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getMaxFontSize()

public static synchronized double getMaxFontSize()

Maximal font size which can be used for field contents. -1 to don’t check size.

Returns: double - double value

setMaxFontSize(double value)

public static synchronized void setMaxFontSize(double value)

Maximal font size which can be used for field contents. -1 to don’t check size.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getMinFontSize()

public static double getMinFontSize()

Minimal font size which can be used for field contents. -1 to don’t check size.

Returns: double - double value

setMinFontSize(double value)

public static void setMinFontSize(double value)

Minimal font size which can be used for field contents. -1 to don’t check size.

Parameters:

ParameterTypeDescription
valuedoubledouble value

getTabOrder()

public int getTabOrder()

Gets or sets tab order of the field.

Returns: int - int value

setTabOrder(int value)

public void setTabOrder(int value)

Gets or sets tab order of the field.

Parameters:

ParameterTypeDescription
valueintint value

add(WidgetAnnotation item)

public void add(WidgetAnnotation item)

Parameters:

ParameterTypeDescription
itemWidgetAnnotation

clear()

public void clear()

contains(WidgetAnnotation item)

public boolean contains(WidgetAnnotation item)

Parameters:

ParameterTypeDescription
itemWidgetAnnotation

Returns: boolean

copyTo(WidgetAnnotation[] array, int arrayIndex)

public void copyTo(WidgetAnnotation[] array, int arrayIndex)

Parameters:

ParameterTypeDescription
arrayWidgetAnnotation[]
arrayIndexint

isReadOnly()

public boolean isReadOnly()

Returns: boolean

remove(WidgetAnnotation item)

public boolean remove(WidgetAnnotation item)

Parameters:

ParameterTypeDescription
itemWidgetAnnotation

Returns: boolean