Class PdfCollectionField
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.collection.PdfCollectionField
-
public class PdfCollectionField extends PdfObjectWrapper<PdfDictionary>
-
-
Field Summary
Fields Modifier and Type Field Description static intCREATIONDATEA possible type of collection field.static intDATEA possible type of collection field.static intDESCA possible type of collection field.static intFILENAMEA possible type of collection field.static intMODDATEA possible type of collection field.static intNUMBERA possible type of collection field.static intSIZEA possible type of collection field.protected intsubTypestatic intTEXTA possible type of collection field.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPdfCollectionField(PdfDictionary pdfObject)PdfCollectionField(java.lang.String name, int subType)Creates a PdfCollectionField.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfBooleangetEditable()Retrieves the state of the editable of the field.PdfNumbergetOrder()Retrieves the order of the field name.PdfObjectgetValue(java.lang.String value)Converts string to appropriate pdf value.PdfBooleangetVisibility()Retrieves the initial visibility of the field.protected booleanisWrappedObjectMustBeIndirect()Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfCollectionFieldsetEditable(boolean editable)Indication if the field value should be editable in the viewer.PdfCollectionFieldsetOrder(int order)The relative order of the field name.PdfCollectionFieldsetVisibility(boolean visible)Sets the initial visibility of the field.-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Field Detail
-
TEXT
public static final int TEXT
A possible type of collection field.- See Also:
- Constant Field Values
-
DATE
public static final int DATE
A possible type of collection field.- See Also:
- Constant Field Values
-
NUMBER
public static final int NUMBER
A possible type of collection field.- See Also:
- Constant Field Values
-
FILENAME
public static final int FILENAME
A possible type of collection field.- See Also:
- Constant Field Values
-
DESC
public static final int DESC
A possible type of collection field.- See Also:
- Constant Field Values
-
MODDATE
public static final int MODDATE
A possible type of collection field.- See Also:
- Constant Field Values
-
CREATIONDATE
public static final int CREATIONDATE
A possible type of collection field.- See Also:
- Constant Field Values
-
SIZE
public static final int SIZE
A possible type of collection field.- See Also:
- Constant Field Values
-
subType
protected int subType
-
-
Constructor Detail
-
PdfCollectionField
protected PdfCollectionField(PdfDictionary pdfObject)
-
PdfCollectionField
public PdfCollectionField(java.lang.String name, int subType)Creates a PdfCollectionField.- Parameters:
name- the field namesubType- the field subtype
-
-
Method Detail
-
setOrder
public PdfCollectionField setOrder(int order)
The relative order of the field name. Fields are sorted in ascending order.- Parameters:
order- a number indicating the order of the field- Returns:
- this instance to support fluent interface
-
getOrder
public PdfNumber getOrder()
Retrieves the order of the field name.- Returns:
- the
PDF numbershowing the order of the field name
-
setVisibility
public PdfCollectionField setVisibility(boolean visible)
Sets the initial visibility of the field.- Parameters:
visible- is a state of visibility- Returns:
- this instance to support fluent interface
-
getVisibility
public PdfBoolean getVisibility()
Retrieves the initial visibility of the field.- Returns:
- the initial visibility of the field as
PDF booleanvalue
-
setEditable
public PdfCollectionField setEditable(boolean editable)
Indication if the field value should be editable in the viewer.- Parameters:
editable- is a state of editable- Returns:
- this instance to support fluent interface
-
getEditable
public PdfBoolean getEditable()
Retrieves the state of the editable of the field.- Returns:
- true if filed is editable and false otherwise. Returned value is presented
as
pdf boolean.
-
getValue
public PdfObject getValue(java.lang.String value)
Converts string to appropriate pdf value.- Parameters:
value- is a plain string representation of the value- Returns:
- resulting
PDF object
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()
Description copied from class:PdfObjectWrapperDefines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.- Specified by:
isWrappedObjectMustBeIndirectin classPdfObjectWrapper<PdfDictionary>- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-