DynaPDF Manual - Page 130

Previous Page 129   Index   Next Page 131

Function Reference
Page 130 of 839
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
AddDPartNode
Syntax:
SI32 pdfAddDPartNode(
const PPDF* IPDF, // Instance pointer
SI32 Parent,
// Parent node handle or -1
SI32 FirstPage,
// First page in range or -1
SI32 LastPage,
// Last page in range or -1
const char* DPM)
// Optional Document Part Metadata (JSON like string)
The function creates a DPart Node. DPart nodes can be used to add metadata to a single page or
range of pages. In addition, DPart nodes can be nested to form a tree like structure.
Unlike XMP metadata streams which base on XML, Document Part Metadata (parameter DPM) is
stored in PDF syntax. This type of metadata supports dictionaries, arrays, strings, name objects,
numbers, and boolean values, or almost the entire range of PDF data types.
DPart nodes require a global root node that must be created with CreateDPartRoot() before this
function can be called the first time.
Two different types of DPart nodes can be created with this function:
If FirstPage and LastPage refer to valid page numbers (the first page is denoted by 1), the
function creates a DPart node with optional DPart metadata (parameter DPM) that will be
associated to these pages.
The Parent node can be -1 for the root node, or a node handle that was returned by this
function. However, nodes which reference pages, cannot be used as parent node for other
DPart nodes.
If FirstPage or LastPage are smaller 1, a DPart node will be created that can be used as parent
node for other DPart nodes. This is useful for grouping nodes or to create a tree like
structure, but in most cases such nodes are mainly used to define a base set of identical
metadata for a range of DPart nodes. Each child node can still define additional metadata.
Document Part Metadata (DPM)
DPM is application-specific information that is generally arbitrary. However, document parts are
part of the PDF/VT standard and therefore mainly used to define print specific data, e.g. job
definition.
Although the metadata can contain arbitrary key / value pairs of data, there is a common naming
sheme defined in ISO 21812-1:2019, for example, that describes how print production metadata can
be named and organized. Keywords in this standard start with the prefix CIP4_.
 

Previous topic: AddDeviceNSeparations, Encoding of Colorant Names

Next topic: How to create DPM?