Class PdfCollection
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.collection.PdfCollection
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the document that will be initially presented in the user interface.Gets the Collection schema dictionary.getSort()
Getter for the Collection sort dictionary.boolean
Check if view is in details mode.boolean
Check if view is hidden.boolean
Check if view is in tile mode.protected boolean
Defines if the object behind this wrapper must be an indirect object in the resultant document.setInitialDocument
(String documentName) Identifies the document that will be initially presented in the user interface.setSchema
(PdfCollectionSchema schema) Sets the Collection schema dictionary.setSort
(PdfCollectionSort sort) Sets the Collection sort dictionary.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 Details
-
DETAILS
public static final int DETAILSA type of initial view- See Also:
-
TILE
public static final int TILEA type of initial view- See Also:
-
HIDDEN
public static final int HIDDENA type of initial view- See Also:
-
-
Constructor Details
-
PdfCollection
-
PdfCollection
public PdfCollection()Constructs a PDF Collection.
-
-
Method Details
-
setSchema
Sets the Collection schema dictionary.- Parameters:
-
schema
- an overview of the collection fields - Returns:
- this instance to support fluent interface
-
getSchema
Gets the Collection schema dictionary.- Returns:
- the Collection schema dictionary
-
setInitialDocument
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
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
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
Sets the Collection sort dictionary.- Parameters:
-
sort
- is the Collection sort dictionary - Returns:
- this instance to support fluent interface
-
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.
-