XMP metadata

Start page  Previous page  Next page

Creating user-defined XMP data

 

n2pdf offers a function for the creation of XML structures which are saved in the XMP block of the PDF document. To do this, n2pdf provides functions for generating your own XML entries and their values so that these can be saved in the XMP area. The data is standardized according to ISO 16684-1:2012.

 

The manner in which your own XML values can be set is shown below. There are three areas available which can be filled in with information:

 

Setting

Description

N2PDFOPTION_PDF_INFO_XMP_ARCHIVEDATA

JobDocument

N2PDFOPTION_PDF_INFO_XMP_NOTESDOC

NotesDocument

N2PDFOPTION_PDF_INFO_XMP_CUSTOMDATA

CustomData

 

Call N2PDFSetOption ( JobID, N2PDFOPTION_PDF_INFO_XMP_CUSTOMDATA,_

“XMP node entry", “XMP node value" )

 

XMP

 

Setting

Description

XMP node entry

Name of the XML node (observe the XML syntax rules)

XMP node value

Notes formula for calculating the node value

 

 

112

Node names may contain letters ("a"-"z"), the numbers “0” through “9”, underscores (“_”), and simple hyphens (“-”). The first character of the name must not be a number. Spaces are not permitted.

 

 

 

N2PDFVALUE_XMLEXPORT_MODE_SETDEFAULTXMP

In addition to creating custom XML structures for storage in the XMP block of the PDF, you can also use predefined structures with this option and using the N2PDFXMLExport function.

 

Below is an example structure:

 

 <n2pdfArchive:NotesDocument rdf:parseType="Resource">

   <nd:servername></nd:servername>

   <nd:dbname>C:\Notes\Data\n2pdf_Attachment_test.nsf</nd:dbname>

   <nd:unid>B2BC6EF46DB33588C12582D60045D537</nd:unid>

   <nd:form>RT</nd:form>

   <nd:created>26.07.2018 14:42:45</nd:created>

   <nd:modified>24.08.2018 15:01:39</nd:modified>

   <nd:updatedby>CN=Development/O=SVD; CN=Development/O=SVD</nd:updatedby>

 </n2pdfArchive:NotesDocument>

 

 

 

N2PDFVALUE_XMLEXPORT_MODE_DXLTOFILE

With this option, using the N2PDFXMLExport function, you can also place the entire Notes document in the specified directory next to the PDF file to be created as an XML file.

 

Example:

Call        N2PDFXMLExport

       ( JobID, _

 N2PDFVALUE_XMLEXPORT_MODE_DXLTOFILE, _

 db.Server, _

 db.FilePath, _

 doc.UniversalID, _

 "c:\temp\XMLExport.xml" )