API reference › Import & Output APIs
pdfImportOCProperties
Recreate the source's optional-content groups (layers) in the
Purpose — Recreate the source's optional-content groups (layers) in the destination.
Description — Walks the source catalog's /OCProperties /OCGs array and creates a destination OCG for each entry, named from the source /Name (fallback Layer N), initially visible. Only the group names are recreated — per-configuration ON/OFF states and order are not imported.
BOOL32 __stdcall pdfImportOCProperties(PPDF IPDF);
Return value — TRUE when an import source is open; FALSE otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Import
pdfImportOCProperties
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.