Class PdfDocumentLayerCollection
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
The class provides methods and properties to handle the collections of PdfLayer
public class PdfDocumentLayerCollection : PdfCollection, IEnumerable
- Inheritance
-
PdfDocumentLayerCollection
- Implements
- Inherited Members
Properties
this[int]
Gets or sets PdfLayer by its index from PdfDocumentLayerCollection
public PdfLayer this[int index] { get; set; }
Parameters
index
int
Property Value
Methods
Add(string)
Creates a new PdfLayer with name and adds it to the end of the collection.
public PdfLayer Add(string name)
Parameters
name
stringLayer Name.
Returns
Add(string, bool)
Creates a new PdfLayer with name and Boolean flag to set the visibility of layer, and adds it to the end of the collection.
public PdfLayer Add(string name, bool visible)
Parameters
Returns
Clear()
Clears layers from the PdfDocumentLayerCollection.
public void Clear()
Contains(PdfLayer)
Checks whether collection contains PdfLayer.
public bool Contains(PdfLayer layer)
Parameters
Returns
- bool
True - if collection contains layer, False otherwise.
Contains(string)
Checks whether collection contains PdfLayer by layer name.
public bool Contains(string name)
Parameters
name
string
Returns
- bool
True - if collection contains layer, False otherwise.
IndexOf(PdfLayer)
Returns index of the PdfLayer in the collection if exists, -1 otherwise.
public int IndexOf(PdfLayer layer)
Parameters
Returns
- int
Returns index of the layer in the collection if exists, -1 otherwise.
Move(int, PdfLayer)
Move PdfLayer into the collection at specified index
public void Move(int index, PdfLayer layer)
Parameters
Remove(PdfLayer)
Removes layer from the collection of Layer.
public void Remove(PdfLayer layer)
Parameters
Remove(PdfLayer, bool)
Removes layer from the collection and remove graphical content, If removeGraphicalContent is true.
public void Remove(PdfLayer layer, bool removeGraphicalContent)
Parameters
Remove(string)
Removes PdfLayer from the collection by its name. If document have muliple layer with same name, it removes all PdfLayers from document.
public void Remove(string name)
Parameters
name
stringName of the layer.
Remove(string, bool)
Remove layer from its collection by its name and remove graphical content, If removeGraphicalContent is true
public void Remove(string name, bool removeGraphicalContent)
Parameters
RemoveAt(int)
Removes layer by its index from collections
public void RemoveAt(int index)
Parameters
index
intIndex of the layer.
RemoveAt(int, bool)
Removes layer by its index from collections and remove graphical content if removeGraphicalContent is true
public void RemoveAt(int index, bool removeGraphicalContent)