DynaPDF Manual - Page 262
Previous Page 261 Index Next Page 263
Function Reference
Page 262 of 839
CreateDPartRoot
Syntax:
LBOOL pdfCreateDPartRoot(
const PPDF* IPDF,
// Instance pointer
const char** NodeNameList, // Required
UI32 NodeNamesCount,
// Number of array values
SI32 RecordLevel)
// Record level or 0
The function creates the DPartRoot dictionary that must be present before DPart nodes can be
created with AddDPartNode().
Note that the function will fail if a DPartRoot dictionary was already imported or created by this
function. You can check whether a DPartRoot dictionary exists with HaveDPartRoot().
DPart stands for Document Part. DParts are a feature of PDF/VT, a PDF format for the printing
industry.
PDF pages are internally stored in a page tree structure. Pages in this tree are organized for fast
access to abitrary pages. Beginning with PDF/VT a second tree structure was added, the DPart tree.
Unlike the page tree, the DPart tree can be used to group pages and to store additational metadata
for these nodes or pages.
Overlapping page ranges are prohibited because page objects, which are referenced by a DPart
node, get a reference of this node. One page can reference exactly one DPart node. This allows direct
access to the additional metadata of a DPart node.
DPart metadata (DPM) is stored in PDF syntax, while regular metadata streams in PDF are XML
based. DPM requires no additional XML or XMP parser and is much faster to parse.
The required parameter NodeNameList represents a label or name for each DPart node level when
displaying the DPart tree on screen with a tree control or when exporting it to XML, for example.
A child node increments the level by 1. When the children of a node were processed or displayed,
the level is decremented by 1. Every DPart node has a parent node. The root node is the one that is
created by this function.
Example:
"N" stands for Node, "P" for Parent node. The number at the end represents the tree node level.
N1,PRoot 0
N2,P1 1
N3,P2 2
N4,P2 2
N5,P2 2
N6,P1 1
N7,P6 2
N8,P7 3
N9,P8 4
N10,P8 4
Previous topic: Example 1:, Example 2:
Next topic: CreateExtGState