Adobe acrobat 7.0.5 sdk User Manual

Page of 122
103
Working with Metadata
The Adobe XMP Toolkit
12
Accessing XMP Metadata Using Acrobat JavaScript
The 
metadata
 method of the Acrobat JavaScript doc object allows you to access the XMP 
metadata embedded in a PDF document. The method returns a string containing the XML 
text stored as metadata in a particular PDF document.
Accessing XMP Metadata From a Plug-in
You can access XMP metadata information using the Acrobat SDK. Plug-ins can get or set 
XMP metadata using the 
PDDocGetXAPMetadataProperty
 and 
PDDocSetXAPMetadataProperty
 APIs. Using these APIs, you can access all of the 
properties in a pdDoc's Info dictionary, as well as properties that are not in the Info 
dictionary. 
N
O T E
:
The term “XAP” refers to an early internal code name for Adobe’s Extensible 
Metadata Platform (XMP). For more information on this protocol, see the Adobe XMP 
Specification
.
You can also get or set the XMP metadata associated with a Cos dictionary or stream, or 
with a PDEContainer. These APIs are all included in the 
PDMetaDataCalls.h
 header file. 
See the Acrobat API and PDF Library API Reference for more information on these APIs.
Acrobat Distiller and XMP Metadata
Acrobat Distiller supports embedding of XMP metadata in PDF files in two ways. 
First, it always generates document level metadata. This metadata is derived from the 
PostScript file and cannot be modified by the PostScript program. To change the document 
level metadata, you must change it in the authoring application that generates the 
PostScript stream.
A second way of adding metadata is to create object data. See 
for more information.
The Adobe XMP Toolkit
The XMP Toolkit is designed to help applications handle XMP operations such as the 
creation and manipulation of metadata. The Toolkit makes it easier for developers to 
support XMP metadata, and helps to standardize how the data is represented and 
interchanged. The XMP Toolkit can be licensed, royalty-free, from Adobe Systems.
The XMP Toolkit features a C++ interface which uses some modern (ANSI) features, such as 
exceptionsSTL strings, and bool. It uses conservative coding and interface design for 
maximum portability and to make it easier for developers to adopt.