TPDFlibFlattenLayers

Data types, optional content

Description

Freezes the supported optional content of the selected document to the visibility state of one configuration while retaining the vector content. TPDFlib validates the usage view and the presence of optional content before the callback runs.

TPDFlib declares the public methods and a protected dispatch method for flattening optional content to one configuration. The edition class supplies the implementation as a callback of this type. A plain TPDFlib instance supplies none, so the call returns the documented empty result and sets LastErrorCode to PDFLIB_ERROR_SMALLBUSINESS_REQUIRED. Application code never declares, assigns or calls a value of this type.

Syntax

Delphi

TPDFlibFlattenLayers = Function(ConfigurationIndex: Integer; Const Usage: WideString): Integer Of Object;

Parameters

ConfigurationIndexZero-based index of the optional-content configuration whose visibility state is baked in; 0 selects the default configuration
UsageUsage view to flatten: an empty string, View, Print or Export

Return values

1The optional content was flattened to the requested configuration
0The operation failed; the public method reports the reason through LastErrorCode

See also

FlattenOptionalContent