XMP Specification September 2005 107 Embedding XMP Metadata in Application Files PostScript and EPS 5 Here is an abbreviated example, modified from the previous example: %%EndPageSetup [/NamespacePush pdfmark ... Do all of the XMP setup as above, up to step 3 ... % Third: Attach the stream to the Marked Content dictionary. % All drawing commands must be between the /BDC and /EMC operators. [/Document 1 dict begin /Metadata {my_metadata_stream_123} def currentdict end /BDC pdfmark [/NamespacePop pdfmark ... All drawing commands go here ... %%PageTrailer [/EMC pdfmark Avoiding Name Conflicts In the samples, we used the name {my_metadata_stream_123} and suggested that some form of unique name be used. The recommended approach is to generate a typical UUID and strip out all but the significant alphanumeric characters. Use this as a suffix to the name. An alternate solution is to use NamespacePush and NamespacePop pdfmarks. This is also the recommended solution in the Pdfmark Reference Manual (it is accessible from Distiller’s Help menu.) This is preferable if possible, but might require large and untenable separation of the push an pop. It is important to put all pdfmarks using the named objects in the same block bracketed by NamespacePush and NamespacePop pair for example, the following PostScript code is bad: [/NamespacePush pdfmark [/_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 [{my_metadata_stream_123} currentfile 0 (% &&end XML Packet marker&&) /SubFileDecode filter metafile_pdfmark ... XML Packet goes here ... % &&end XML Packet marker&& [/NamespacePop pdfmark % At this point, the name {my_metadata_stream_123} is no longer usable. % next line will cause “undefined” error: [{Catalog} {my_metadata_stream_123} /Metadata pdfmark
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com