THotPDF.AddLoadedOptionalContentGroup Method

Creates a new optional content group (layer) on a loaded document and registers it in /OCProperties /OCGs and the default /D configuration

Declaration

function AddLoadedOptionalContentGroup(const AName: AnsiString; VisibleByDefault: boolean = True): Integer;

Unit

HPDFDoc

Parameters

NamePurpose
ANameLayer name shown to PDF viewers
VisibleByDefaultInitial visibility written into the default configuration's /ON or /OFF array

Return value

Index of the new layer in the OCG array or -1 on failure

Usage notes

Related APIs