XMP Specification September 2005 105 Embedding XMP Metadata in Application Files PostScript and EPS 5 NOTE: When EPS files are concatenated, it is necessary to provide a new set of PostScript header comments for the aggregate, and optionally new a main XMP packet. Otherwise the XMP marker comment from the first EPS portion would erroneously be taken to refer to the aggregate. Document-Level XMP in PostScript This section assumes that PostScript devices are level 2 or newer, and that Distiller version 6.0 or newer is used. Compatibility issues are discussed in “Compatibility With Distiller 5 for PostScript” on page 108 and “LanguageLevel 1 for PostScript and EPS” on page 108. There are three main steps to setting up the document-level XMP: 1. Creating a PostScript stream object to contain the XMP. 2. Placing the XMP into the stream object. 3. Associating the XMP stream object with the document. XMP metadata must be embedded in a PostScript file in a way that it will be recognized by software that scans files for metadata, which means embedding the complete XMP packet. However, if that file were sent to a PostScript output device, the packet data would cause PostScript errors and the job would fail. To be able to handle arbitrary data, we need a procedure to read the XMP data from the current file, and discard the data if it is not intended to be interpreted. NOTE: In what follows, we define some procedures in a private dictionary like: privatedict /metafile_pdfmark {flushfile cleartomark} bind put The name privatedict is for illustration purpose only. In the real product code, these procedures should be defined in a unique dictionary so that several EPS files can be used in one document and slightly different versions of these procedures can co-exist. Here is an example that shows how to embed document-level XMP in PostScript. This example does not include the required marker comment. % ====================================================================== % We start with some Postscript prolog. This defines operators and % procedures that we will use when processing the XMP metadata. % Define pdfmark to cleartomark, so the data is discarded when consumed % by a PostScript printer or by Distiller 4.0 or earlier. All following % references to “privatedict” should be changed to a unique name to % avoid potential conflicts. This is discussed later in the section % “Avoiding Name Conflicts” on page 107. /currentdistillerparams where {pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse {privatedict /pdfmark /cleartomark load put
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com