Skip to content

modern-pdf-lib


modern-pdf-lib / beginLayerContent

Function: beginLayerContent()

beginLayerContent(layer): string

Defined in: src/layers/optionalContent.ts:292

Generate the PDF operator to begin optional content for a layer.

This produces a BDC (begin marked-content with properties) operator that activates the given layer.

Parameters

layer

PdfLayer

The layer to activate.

Returns

string

The PDF operator string: /OC /LayerName BDC\n

Released under the MIT License.