DynaPDF.AddDPartNode
--------------------

Creates a DPart Node.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [13.3](newinversion133.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.AddDPartNode"; PDF; Parent; FirstPage; LastPage { ; DPM } ) 

**MBS**( **"DynaPDF.AddDPartNode";** /\* Creates a DPart Node. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Parent**; /\* Parent node handle or -1.e.g. -1 \*/   
**$FirstPage**; /\* First page in range or -1.e.g. -1 \*/   
**$LastPage**; /\* Last page in range or -1.e.g. -1 \*/   
**$DPM**) /\* Optional; Optional Document Part Metadata (JSON like string) \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Parent | Parent node handle or -1. | -1 |  |
| FirstPage | First page in range or -1. | -1 |  |
| LastPage | Last page in range or -1. | -1 |  |
| DPM | Optional Document Part Metadata (JSON like string) |  | Optional |

### Result

Returns number or error.

### Description

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.   
See also [AddDPartNode](https://www.monkeybreadsoftware.com/DynaPDF-Manual/AddDPartNode.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.CreateDPartRoot](DynaPDFCreateDPartRoot.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 13.3**
    - Added [DynaPDF.AddDPartNode](https://www.mbsplugins.eu/DynaPDFAddDPartNode.shtml), [DynaPDF.CreateDPartRoot](https://www.mbsplugins.eu/DynaPDFCreateDPartRoot.shtml), [DynaPDF.DeleteWatermark](https://www.mbsplugins.eu/DynaPDFDeleteWatermark.shtml), [DynaPDF.GetLastTextOffset](https://www.mbsplugins.eu/DynaPDFGetLastTextOffset.shtml), [DynaPDF.HaveDPartRoot](https://www.mbsplugins.eu/DynaPDFHaveDPartRoot.shtml), [DynaPDF.MarkTemplateAsWatermark](https://www.mbsplugins.eu/DynaPDFMarkTemplateAsWatermark.shtml) and [DynaPDF.OpenTagEx](https://www.mbsplugins.eu/DynaPDFOpenTagEx.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.3](https://www.mbsplugins.de/archive/2023-07-25/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.3 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-07-18/Neues_MBS_Plugin_133_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.3 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-07-18/MBS_Plugin_133_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.3pr2](https://www.mbsplugins.de/archive/2023-06-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 13th June 2023 , last changed 5th November 2023

  
[DynaPDF.AddContinueText](DynaPDFAddContinueText.md) - [DynaPDF.AddDeviceNProcessColorants](DynaPDFAddDeviceNProcessColorants.md)

[HTML Version](DynaPDFAddDPartNode.shtml)