TPDFlibSBLayers
Editions
Description
TPDFlibSBLayers (unit PDFlibSBLayers) descends from TPDFlibSBDataMerge and implements the Small Business method for flattening optional content (layers): it flattens the layers of the selected document according to a selected optional-content configuration and a usage intent, which is View, Print or Export.
It belongs to the Small Business edition; the Enterprise edition includes every Small Business class, so it is part of both editions. TPDFlibSBBarcodes descends from it and adds the next feature group.
Syntax
Delphi
TPDFlibSBLayers = Class(TPDFlibSBDataMerge);Key members
| FlattenOptionalContent | Flattens the optional content of the selected document to the state that the configuration ConfigurationIndex and the usage Usage select; returns 1 on success and 0 when the input was rejected, before the source changes |
|---|
Remarks
ConfigurationIndex 0 selects the default configuration (/D); a positive index selects /Configs[index - 1]. Usage is View, Print or Export; an empty value means View.
The flattening runs on a private copy of the document. The selected document is replaced only after the flattened result was saved and reopened; when the flattening is rejected, LastErrorCode is set to PDFLIB_ERROR_OPTIONAL_CONTENT_FLATTEN and the source is retained.
Applications normally create TPDFlibSmallBusiness or TPDFlibEnterprise and get the methods of this class through them. The same methods on a plain TPDFlib return 0, an empty string or False and set LastErrorCode to PDFLIB_ERROR_SMALLBUSINESS_REQUIRED.
See also
TPDFlibSBDataMerge, TPDFlibSBBarcodes, TPDFlibSmallBusiness, TPDFlibEnterprise