Class PdfCollection
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.collection.PdfCollection
-
public class PdfCollection extends PdfObjectWrapper<PdfDictionary>
-
-
Constructor Summary
Constructors Constructor Description PdfCollection()
Constructs a PDF Collection.PdfCollection(PdfDictionary pdfObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfString
getInitialDocument()
Retrieves the document that will be initially presented in the user interface.PdfCollectionSchema
getSchema()
Gets the Collection schema dictionary.PdfCollectionSort
getSort()
Getter for the Collection sort dictionary.boolean
isViewDetails()
Check if view is in details mode.boolean
isViewHidden()
Check if view is hidden.boolean
isViewTile()
Check if view is in tile mode.protected boolean
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfCollection
setInitialDocument(java.lang.String documentName)
Identifies the document that will be initially presented in the user interface.PdfCollection
setSchema(PdfCollectionSchema schema)
Sets the Collection schema dictionary.PdfCollection
setSort(PdfCollectionSort sort)
Sets the Collection sort dictionary.PdfCollection
setView(int viewType)
Sets the initial view.-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Field Detail
-
DETAILS
public static final int DETAILS
A type of initial view- See Also:
- Constant Field Values
-
TILE
public static final int TILE
A type of initial view- See Also:
- Constant Field Values
-
HIDDEN
public static final int HIDDEN
A type of initial view- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PdfCollection
public PdfCollection(PdfDictionary pdfObject)
-
PdfCollection
public PdfCollection()
Constructs a PDF Collection.
-
-
Method Detail
-
setSchema
public PdfCollection setSchema(PdfCollectionSchema schema)
Sets the Collection schema dictionary.- Parameters:
schema
- an overview of the collection fields- Returns:
- this instance to support fluent interface
-
getSchema
public PdfCollectionSchema getSchema()
Gets the Collection schema dictionary.- Returns:
- the Collection schema dictionary
-
setInitialDocument
public PdfCollection setInitialDocument(java.lang.String documentName)
Identifies the document that will be initially presented in the user interface.- Parameters:
documentName
- a string that identifies an entry in the EmbeddedFiles name tree- Returns:
- this instance to support fluent interface
-
getInitialDocument
public PdfString getInitialDocument()
Retrieves the document that will be initially presented in the user interface.- Returns:
- a pdf string that identifies an entry in the EmbeddedFiles name tree
-
setView
public PdfCollection setView(int viewType)
Sets the initial view.- Parameters:
viewType
- is a type of view- Returns:
- this instance to support fluent interface
-
isViewDetails
public boolean isViewDetails()
Check if view is in details mode.- Returns:
- true if view is in details mode and false otherwise
-
isViewTile
public boolean isViewTile()
Check if view is in tile mode.- Returns:
- true if view is in tile mode and false otherwise
-
isViewHidden
public boolean isViewHidden()
Check if view is hidden.- Returns:
- true if view is hidden and false otherwise
-
setSort
public PdfCollection setSort(PdfCollectionSort sort)
Sets the Collection sort dictionary.- Parameters:
sort
- is the Collection sort dictionary- Returns:
- this instance to support fluent interface
-
getSort
public PdfCollectionSort getSort()
Getter for the Collection sort dictionary.- Returns:
- the Collection sort
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()
Description copied from class:PdfObjectWrapper
Defines 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:
isWrappedObjectMustBeIndirect
in classPdfObjectWrapper<PdfDictionary>
- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-