Exporting XML Metadata
Introduction
This chapter explains how to export XML metadata from PDF documents that have been saved in or created by Adobe Acrobat 5.0 or above. The metadata is specified in XMP, Adobe’s eXtensible Metadata Platform. XMP is based on RDF (Resource Description Framework), a standard model for supplying metadata. There are two schemas associated with XMP: PDF and XAP. PDF files provide metadata in both formats.
Note: XML metadata is only available in PDF files created by Acrobat 5 and above. PDF files created prior to Acrobat 5 will return the following warning:
Warning: This file does not contain any XML metadata
Performing the Export
Use the -metadata option to export XML metadata from a PDF document.
Command
$apgetinfo -metadata inPDFFile
Windows Example
$apgetinfo -metadata C:\Appligent\APGetInfo\samples\ApUtilsSample.pdf
UNIX/Macintosh Example
$apgetinfo -metadata /Appligent/APGetInfo/samples/ApUtilsSample.pdf
Result
The figure below shows the results of running apgetinfo with the -metadata option on the ApUtilsSample.pdf file. Note the PDF schema and the XAP schema.