104 September 2005 XMP Specification Embedding XMP Metadata in Application Files PostScript and EPS 5 Write the %ADO_ContainsXMP comment as described under “Ordering of Content” on page 104. Write the XMP packet as described under “Document-Level XMP in EPS” on page 106. Use of raw PostScript is discouraged specifically because it lacks the %ADO_ContainsXMP comment. If raw PostScript must be used, the XMP must be embedded as described under “Document-Level XMP in PostScript” on page 105. Ordering of Content Many large publications use PostScript extensively. It is common to have very large layouts with hundreds or thousands of placed EPS files. Because PostScript is text, locating XMP embedded within PostScript in general requires parsing the entire PostScript program, or at least scanning all of its text. Placed PostScript files can be quite large. They can even represent compound documents, and might contain multiple XMP packets. For PostScript files containing XMP at all, the entire file would have to be searched to make that simple determination. All of this presents performance challenges for layout programs that want to process XMP embedded in PostScript. As a pragmatic partial solution, a special marker comment can be placed in the PostScript header comments to provide advice about locating the main XMP. This marker must be before the %%EndComments line. The purpose of this marker is to tell applications consuming the PostScript whether a main XMP is present at all, and how to look for the main XMP. The form of the XMP marker is: %ADO_ContainsXMP: option ... The marker must be at the beginning of a line. An option is a contiguous sequence of characters that does not include spaces, tabs, linefeeds, or carriage returns options are case sensitive. There must be no whitespace before the colon. Applications should ignore options they do not understand. There are three options defined at present. They are mutually exclusive and provide a hint about how to find the main XMP. Note that the main XMP is not necessarily the document- level XMP: MainFirst: the main XMP is the first XMP packet in the file and is located near the front of the file. The XMP should be in front of as much PostScript content as possible. MainLast: the main XMP is the last XMP packet in the file and is located near the back of the file. The XMP should be behind as much PostScript content as possible. NoMain: there is no main XMP packet for the PostScript file. The file might still contain XMP packets, for example within embedded EPS sections or attached to internal objects. NOTE: The XMP location option applies to both the location of the main XMP in the file and to its position relative to other object-level XMP. The main XMP packet must be before all other XMP if MainFirst is used it must be after all other XMP if MainLast is used. It is not necessary for the other XMP packets to be adjacent to the main packet.
Previous Page Next Page