Layer
Overview
Layer is a class in Aspose.PDF FOSS for Java.
Represents an Optional Content Group (layer) in a PDF document (ISO 32000-1:2008, §8.11).
This class provides 7 methods for working with Layer objects in Java programs.
Available methods include: Layer, getContents, getId, getName, getPdfDictionary, setName.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: contents, id, name, pdfDictionary.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
id | String | Read | Returns the layer ID. |
name | String | Read | Returns the layer name (/Name). |
contents | List<Operator> | Read | Returns content operators for this layer. |
pdfDictionary | PdfDictionary | Read | Returns the underlying OCG dictionary. |
Methods
| Signature | Description |
|---|---|
Layer(id: String, name: String) | Creates a new layer. |
Layer(ocgDict: PdfDictionary) | Wraps an existing OCG dictionary. |
getId() → String | Returns the layer ID. |
getName() → String | Returns the layer name (/Name). |
setName(name: String) | Sets the layer name. |
getContents() → List<Operator> | Returns content operators for this layer. |
getPdfDictionary() → PdfDictionary | Returns the underlying OCG dictionary. |