Layer

Overview

Layer is a class in Aspose.PDF FOSS for .NET.

A PDF layer (Optional Content Group) as exposed through Layers.

This class provides 7 methods for working with Layer objects in .NET programs. Available methods include: Delete, Flatten, Layer, Lock, Save, Unlock. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Contents, DefaultState, Id, Locked, Name.

Properties

NameTypeAccessDescription
IdstringReadThe layer identifier (page-resource property name once attached).
NamestringReadThe layer’s human-readable name.
ContentsList<Operator>ReadOperators that make up this layer’s content.
DefaultStateDefaultStateRead/WriteDefault visibility state.
LockedboolReadWhether the layer is locked (cannot be toggled by the viewer).

Methods

SignatureDescription
Layer(id: string, name: string)Create a new, detached layer.
Lock()Lock this layer.
Unlock()Unlock this layer.
Delete()Remove this layer and its content from the page.
Flatten(cleanupContentStream: bool)Flatten this layer’s content into the unconditional page content.
Save(outputStream: System.IO.Stream)Save this layer’s content as a standalone single-page PDF stream.
Save(outputPath: string)Save this layer’s content as a standalone single-page PDF file.

See Also

 English