Graphics Programs Reference
In-Depth Information
XML Metadata
Starting with PDF 1.4,
metadata streams
can be used to attach XML metadata to the
whole document, or to individual elements within it. Document level metadata streams
extend and supersede the document information dictionary (which is almost always
included for compatibility with older PDF programs).
The metadata is stored uncompressed and (typically) unencrypted, and in such a way
that external tools which don't know about PDF can find it within a PDF file easily.
The XML uses markup defined by the Extensible Metadata Platform (XMP) which is
described in Adobe's
XMP: Extensible Metadata Platform
. This format includes a
method of embedding the metadata in other formats (e.g., PDF) in a platform-
independent way so that programs which cannot understand the enclosing format can
still extract the XMP data. Full details of the XMP Format are on
Adobe's website
.
Example XMP metadata is shown in
Example 7-2
. You can see some of the familiar
entries from the document information dictionary. Note also the sequence
/Type /
Metadata /Subtype /XML
which identifies this stream as XMP metadata. A metadata
stream is added to a document by using the
/Metadata
entry in the document catalog.
Example 7-2. XML Metadata for the ISO PDF Format reference manual PDF. The
↵
symbol is used
to indicate a line which continues without a carriage return. The
␣
symbol is used to represent a space
character.
4884
␣
0
␣
obj<</Length
␣
3508/Type/Metadata/Subtype/XML>>stream
<?xpacket
␣
begin=''
␣
id='W5M0MpCehiHzreSzNTczkc9d'?>
<?adobe-xap-filters
␣
esc="CRLF"?>
<x:xmpmeta
␣
xmlns:x='adobe:ns:meta/'
␣
x:xmptk='XMP
␣
toolkit
␣
2.9.1-14,
␣
framework
␣
1.6'>
<rdf:RDF
␣
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
↵
xmlns:iX='http://ns.adobe.com/iX/1.0/'>
<rdf:Description
␣
rdf:about='uuid:b8659d3a-369e-11d9-b951-000393c97fd8'
↵
␣
xmlns:pdf='http://ns.adobe.com/pdf/1.3/'
↵
␣
pdf:Producer='Acrobat
␣
Distiller
␣
6.0.1
␣
for
␣
Macintosh'>
↵
</rdf:Description>
<rdf:Description
␣
rdf:about='uuid:b8659d3a-369e-11d9-b951-000393c97fd8'
↵
␣
xmlns:xap='http://ns.adobe.com/xap/1.0/'
↵
␣
xap:CreateDate='2004-11-14T08:41:16Z'
↵
␣
xap:ModifyDate='2004-11-14T16:38:50-08:00'
↵
␣
xap:CreatorTool='FrameMaker
␣
7.0'
↵
␣
xap:MetadataDate='2004-11-14T16:38:50-08:00'>
↵
</rdf:Description>
<rdf:Description
␣
rdf:about='uuid:b8659d3a-369e-11d9-b951-000393c97fd8'
↵
␣
xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/'
↵
␣
xapMM:DocumentID='uuid:919b9378-369c-11d9-a2b5-000393c97fd8'/>
<rdf:Description
␣
rdf:about='uuid:b8659d3a-369e-11d9-b951-000393c97fd8'
↵
␣
xmlns:dc='http://purl.org/dc/elements/1.1/'
↵
␣
dc:format='application/pdf'>
↵
<dc:description><rdf:Alt>
↵
<rdf:li
␣
xml:lang='x-default'>
␣
Adobe
␣
Portable
␣
Document
␣
Format
␣
(PDF)
␣
</rdf:li>
↵
</rdf:Alt></dc:description>
↵
<dc:creator>
␣
<rdf:Seq>
␣
<rdf:li>
↵