Public Member Functions | |
LayerTree (PDFDoc document) throws com.foxit.sdk.PDFException | |
Constructor, from a PDF document. More... | |
LayerTree (LayerTree other) | |
Constructor, with another LayerTree object. More... | |
PDFDictionary | getDict () throws com.foxit.sdk.PDFException |
Get the dictionary of current object. More... | |
PDFArray | getOCGs () throws com.foxit.sdk.PDFException |
Get the "OCGs" PDF array from current object. More... | |
LayerNode | getRootNode () throws com.foxit.sdk.PDFException |
Get the root layer node. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
boolean | setBaseState (int state) throws com.foxit.sdk.PDFException |
Set the base state for all layers in the default configuration. More... | |
Static Public Attributes | |
static final int | e_StateOFF = 0x0001 |
The state is OFF. | |
static final int | e_StateON = 0x0000 |
The state is ON. | |
static final int | e_StateUnchanged = 0x0002 |
The state is unchanged. | |
static final int | e_StateUndefined = 0x0003 |
The state is undefined. | |
PDF layer nodes are stored in a PDF layer tree. If user wants to retrieve a layer node, user must construct a PDFLayerTree object from a PDF document first and then call function LayerTree::getRootNode to get the root layer node of the whole layer tree. Then, user can enumerate all the nodes in the layer tree from the root layer node.
com.foxit.sdk.pdf.LayerTree.LayerTree | ( | PDFDoc | document | ) | throws com.foxit.sdk.PDFException |
Constructor, from a PDF document.
Currently, the constructed LayerTree object can only be associated with existed layer tree in PDF document. If there is no layer tree in PDF document, functoin LayerTree::isEmpty of the constructed LayerTree will return true.
document | A valid PDF document object. |
com.foxit.sdk.pdf.LayerTree.LayerTree | ( | LayerTree | other | ) |
PDFDictionary com.foxit.sdk.pdf.LayerTree.getDict | ( | ) | throws com.foxit.sdk.PDFException |
Get the dictionary of current object.
PDFArray com.foxit.sdk.pdf.LayerTree.getOCGs | ( | ) | throws com.foxit.sdk.PDFException |
Get the "OCGs" PDF array from current object.
LayerNode com.foxit.sdk.pdf.LayerTree.getRootNode | ( | ) | throws com.foxit.sdk.PDFException |
Get the root layer node.
After getting the root layer node, user can enumerate all layer nodes in current layer tree by functions of class LayerNode.
boolean com.foxit.sdk.pdf.LayerTree.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
boolean com.foxit.sdk.pdf.LayerTree.setBaseState | ( | int | state | ) | throws com.foxit.sdk.PDFException |
Set the base state for all layers in the default configuration.
If user wants the new state to have effect on rendering result, please construct a new LayerContext object after this function succeeds, and then use the new LayerContext to Renderer to do rendering.
\
state | Layer usage state. Please refer to values starting from e_StateON and this should be one of these values except e_StateUndefined. |