106 September 2005 XMP Specification Embedding XMP Metadata in Application Files PostScript and EPS 5 privatedict /metafile_pdfmark {flushfile cleartomark} bind put} {privatedict /metafile_pdfmark {/PUT pdfmark} bind put} ifelse % ====================================================================== % We now create the stream containing the XMP metadata. This must follow % the prolog shown above, but does not need to be adjacent to it. % Create a pdfmark named stream object to hold the data. As with the % privatedict above, use of a unique name is recommended, not literally % my_metadata_stream_123. The name of this stream is local to the % Postscript program, it has no outside significance. % % First define the stream object, then read the XMP packet into the % stream, finally attach the stream as the main XMP. % % The “&&end XMP packet marker&&” comment is significant, it terminates % the reading of the XMP packet. % First: Create the XMP metadata stream object and say that it is XMP. [/_objdef {my_metadata_stream_123} /type /stream /OBJ pdfmark [{my_metadata_stream_123} 2 dict begin /Type /Metadata def /Subtype /XML def currentdict end /PUT pdfmark % Second: Fill the stream with the XMP packet. [{my_metadata_stream_123} currentfile 0 (% &&end XMP packet marker&&) /SubFileDecode filter metafile_pdfmark ... XMP packet goes here ... % &&end XMP packet marker&& % Third: Attach the stream as the main XMP metadata stream. [{Catalog} {my_metadata_stream_123} /Metadata pdfmark Document-Level XMP in EPS Embedding XMP inside EPS is very similar to PostScript however, there are issues raised by the common practice of embedding EPS within other EPS or PostScript. The notion of document-level XMP in EPS really means outermost XMP in the EPS. This will be document- level XMP in the PDF if the EPS is distilled alone. This will be appropriate marked content if the EPS is embedded in other EPS or PostScript. The solution for EPS requires: ● The XMP must be placed before all EPS content (PostScript drawing commands). ● The /BDC and /EMC pdfmarks must be used to bracket the EPS content. ● The third XMP setup step uses different PostScript code.
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com