XMP Metadata

The webPDF server can use the "Toolbox" web service and the xmp operation element to embed "Extensible Metadata Platform" (XMP) metadata in existing PDF documents. When this takes place, it is possible to define a special structure and to have webPDF integrate it into the XMP block of the PDF. The data is standardized according to ISO 16684-1:2012.

 

If a corresponding XMP block already exists in the PDF, then it is supplemented. If there is no corresponding data, then a new XMP block is created. When this takes place, the structure is set up in such a way that an existing PDF/A document can also be supplemented, or the data are prepared to allow for a PDF/A conversion.

 

The data is defined in a JSON data structure that is passed using the "data element." The properties of this data structure are evaluated and translated into an XMP block so that an XMP schema is created.

 

The schema generated this way is defined with the "namespace element."

 

hint

All of the properties for the schema must be specified so that the XMP schema can be created correctly.

 

The JSON structure for defining the XMP data is passed in "data." The JSON structure consists of an array that contains the individual properties. Each property, in turn, features five properties:

 

propertyName (string, any text)

propertyType (string containing the values "Real", "Integer", "Date", "Boolean", "Text", "Schema”)

propertyCategory (string containing the values "internal" or "external")

propertyDescription (string, any text)

propertyValue (data value corresponding to the type of "propertyType")

 

Be sure to pay attention to the correct syntax when specifying the values in the JSON structure.

 

Sub-schema

 

When the value "Schema" is specified for "propertyType", then it is possible to define a “Sub-schema" which, in turn, possesses a "Namespace" and a "URI". The “Sub-schema" is then defined via "propertyValue". In the sub-schema, these arguments are passed with

 

typePrefix

typeURI

typeDescription

 

 

 

The

 

fields

 

property is then used to specify an array that in turn defines properties for the schema

 

Below you will find an example that defines a JSON structure, the properties and also creates a sub-schema.

 

Example of a JSON data structure:

 

[
   {
      "propertyName": "RealValue",
      "propertyType": "Real",
      "propertyCategory": "external",
      "propertyDescription": "This is a Real Value",
      "propertyValue": 987.65
   },
   {
      "propertyName": "IntegerValue",
      "propertyType": "Integer",
      "propertyCategory": "external",
      "propertyDescription": "This is a Integer Value",
      "propertyValue": 12345
   },
   {
      "propertyName": "DateValue",
      "propertyType": "Date",
      "propertyCategory": "external",
      "propertyDescription": "This is a Date Value",
      "propertyValue": "2004-10-05T16:17:18+02:00"
   },
   {
      "propertyName": "BooleanValue",
      "propertyType": "Boolean",
      "propertyCategory": "external",
      "propertyDescription": "This is a Boolean Value",
      "propertyValue": true
   },
   {
      "propertyName": "TextValue",
      "propertyType": "Text",
      "propertyCategory": "external",
      "propertyDescription": "This is a Text Value",
      "propertyValue": “Hello world!"
   },
   {
      "propertyName": "NotesDocument",
      "propertyType": "Schema",
      "propertyCategory": "internal",
      "propertyDescription": "Notes Document Description",
      "propertyValue": {
          "typePrefix": "nd",
          "typeURI": "http://ns.softvision.de/webpdf/6.0/archive/notesdocument/",
          "typeDescription": "Notes Schema",
          "fields": [
               {
                  "propertyName": "Id",
                  "propertyDescription": "document ID",
                  "propertyType": "Text",
                  "propertyValue": "ABC-01234-56789-0"
               },
               {
                  "propertyName": "Ticket",
                  "propertyDescription": "Support-Ticket ID",
                  "propertyType": "Integer",
                  "propertyValue": 815
               }
           ]
       }
   },
   {
      "propertyName": "PriceDocument",
      "propertyType": "Schema",
      "propertyCategory": "internal",
      "propertyDescription": "Price Document Description",
      "propertyValue":
               {
                  "typePrefix": "ps",
                  "typeURI": "http://ns.softvision.de/webpdf/6.0/archive/pricedocument/",
                  "typeDescription": "Price Schema",
                  "fields": [
                       {
                          "propertyName": "Price",
                          "propertyDescription": "Product price",
                          "propertyType": "Real",
                          "propertyValue": 520.55
                       },
                       {
                          "propertyName": “ArticleNo",
                          "propertyDescription": "Article number",
                          "propertyType": "Integer",
                          "propertyValue": 9876
                       }
                   ]
               }
   }
 
]