BOOL32 __stdcall pdfCreateDPartRoot(PPDF IPDF, PPAnsiChar NodeNameList, uint32_t NodeNamesCount, int32_t RecordLevel);
BOOL32 __stdcall pdfDeleteDPartNode(PPDF PPDF, int32_t Handle);
BOOL32 __stdcall pdfHaveDPartRoot(PPDF IPDF);
function pdfCreateDPartRoot(const IPDF: PPDF; NodeNameList: PPAnsiChar; NodeNamesCount: Cardinal; RecordLevel: Integer): LongBool; stdcall;
function pdfDeleteDPartNode(const PPDF: PPDF; Handle: Integer): LongBool; stdcall;
function pdfHaveDPartRoot(const IPDF: PPDF): LongBool; stdcall;
Purpose. Create/manage the /DPart document-partitioning tree — a PDF 2.0 mechanism for grouping page ranges into named, independently- attributed sub-documents (e.g. chapters with distinct default viewer settings).
Description. pdfDeleteDPartNode's own document-handle parameter is literally named PPDF — identical to its type name PPDF — a real naming collision preserved from the original exported C header (visible directly in both the C and Pascal declarations above); this compiles and works correctly in both languages (the parameter name simply shadows the type name within the function's scope) but is a notable oddity worth flagging so it isn't mistaken for a documentation transcription error. pdfCreateDPartRoot builds the tree from a flat list of node names (NodeNameList/NodeNamesCount, a null entry becomes an empty-string node) plus a RecordLevel (how many levels of the name list correspond to actual /DPart nesting depth).
Parameters.
| Parameter | Description |
|---|---|
IPDF/PPDF | Document handle (see the naming-collision note for pdfDeleteDPartNode). |
NodeNameList, NodeNamesCount | *(Create only)* Flat array of node names. |
RecordLevel | *(Create only)* Nesting depth the name list represents. |
Handle | *(Delete only)* The /DPart node handle to remove. |
Return value. pdfCreateDPartRoot/pdfDeleteDPartNode: True on success. pdfHaveDPartRoot: True if a /DPart tree has been created.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfDeleteDPartNode
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.