public class Layer
extends java.lang.Object
Layer
represents a PDF layer.
The Layer
class defines methods to get properties of a layer.
It can be constructed by the following way:
Example:
Layer layer = LayerNode#getLayer();
LayerNode
Modifier and Type | Method and Description |
---|---|
long |
getHandle()
Get the
Layer handle. |
java.lang.String |
getName()
Get the name of current PDF layer.
|
boolean |
hasIntent(java.lang.String intent)
Check whether current PDF layer has a specific intent.
|
boolean |
isInPage(PDFPage page)
Check whether current PDF layer is in a given page or not.
|
public long getHandle()
Layer
handle.Layer
handle.public java.lang.String getName() throws PDFException
String
object that receives a layer name.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public boolean isInPage(PDFPage page) throws PDFException
page
- A PDFPage
object which is a PDF page. It shall be valid.boolean
value which indicates whether a layer is in a given page or not:
true
means in the page, while false
means not.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFPage
public boolean hasIntent(java.lang.String intent) throws PDFException
intent
- A String
object that specifies the intent name.
Currently, PDF defines two intent names:"View","Design".boolean
value which indicates whether a layer has a specific intent
true
means it has the intent, while false
means not.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException