XMP Specification Part 3: Storage in Files - Adobe
XMP Specification Part 3: Storage in Files - Adobe
XMP Specification Part 3: Storage in Files - Adobe
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
2.4.2 INDD, INDT (<strong>Adobe</strong> InDesign®)<br />
InDesign document files (.<strong>in</strong>dd) and InDesign template files (.<strong>in</strong>dt) are primarily paged database files. They<br />
have 4 KB pages with a lead<strong>in</strong>g pair of master pages to allow s<strong>in</strong>gle write commits. The detailed structure of the<br />
database is proprietary.<br />
Externally editable <strong>XMP</strong> is supported for database files from InDesign 2.0 and later through a "contiguous<br />
object" section at the end of the file. It is possible to modify, even extend, the <strong>XMP</strong> <strong>in</strong> the contiguous object<br />
section. It is not possible to add <strong>XMP</strong> to a database that has none without <strong>in</strong>timate knowledge of the database.<br />
In brief, the active master page tells how many database pages the file conta<strong>in</strong>s. The contiguous object section<br />
beg<strong>in</strong>s after the last database page and extends to the end of the file. It conta<strong>in</strong>s copies of database objects,<br />
stored <strong>in</strong> a contiguous (nonpaged) manner.<br />
Figure 5 shows the layout. In the figure:<br />
• The curved arrow represents the fact that the current (active) master page <strong>in</strong>dicates how many database<br />
pages there are, enabl<strong>in</strong>g an application to f<strong>in</strong>d the beg<strong>in</strong>n<strong>in</strong>g of the contiguous object section.<br />
• Ma<strong>in</strong> pages: This is the ma<strong>in</strong> part of the database file, comprised of 4 KB pages. The first two pages--the<br />
master pages--are used to determ<strong>in</strong>e how big this part of the file is (that is, where the contiguous object<br />
copies start). Otherwise, this data can be ignored when scann<strong>in</strong>g for <strong>XMP</strong> data, and you should never alter<br />
this portion of the file if you are modify<strong>in</strong>g <strong>XMP</strong> data.<br />
• Contiguous objects: Follow<strong>in</strong>g the data pages, copies of contiguous objects are written, and each has a<br />
special header and trailer. Here you would f<strong>in</strong>d any <strong>XMP</strong> objects, and you may rewrite this part of the file if<br />
you need to expand the file’s <strong>XMP</strong> data beyond whatever padd<strong>in</strong>g is supplied <strong>in</strong> the <strong>XMP</strong> packet.<br />
• Zero padd<strong>in</strong>g: The file is zero padded so that the file size is a multiple of 4 KB.<br />
Figure 5 — InDesign file layout<br />
The majority of an InDesign database file consists of the 4 KB pages that comprise the transacted database<br />
storage. You can use the first two pages <strong>in</strong> the file, called the Master Pages, to determ<strong>in</strong>e whether contiguous<br />
objects are present, where they are, and whether they <strong>in</strong>clude any <strong>XMP</strong> metadata objects that conta<strong>in</strong> <strong>XMP</strong><br />
packets. InDesign document databases do typically conta<strong>in</strong> <strong>XMP</strong> metadata, but this is not strictly required.<br />
Other types of InDesign files, such as book files, do not currently conta<strong>in</strong> metadata.<br />
• For details of the Master Page structure, see 2.4.2.3, “Master page structure”.<br />
• For details of the Header and Trailer that enclose each contiguous object, see 2.4.2.4, “Header and trailer<br />
structure”<br />
36 ©<strong>Adobe</strong> Systems Incorporated, 2010