XMP Specification September 2005 109 Embedding XMP Metadata in Application Files PostScript and EPS 5 markerString anchorsearch {pop pop cleartomark exit} {3 copy /PUT pdfmark pop 2 copy (\n) /PUT pdfmark} ifelse } loop end }bind put % ====================================================================== % 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 in PDF to hold the data. As with % 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 LineLength below must be replaced with a value larger than the % longest line in the XMP packet. There is no safe and general way to % exactly determine this, the XMP can be modified in place after the % Postscript is written and could legally all be on one line. % % The overall length of the packet cannot change though. You should set % the LineLength to the lesser of the packet size and 65500. The upper % limit keeps this within the 64KB limit of PostScript strings. % % The “&&end XML 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: Read the XMP packet into the stream. [{my_metadata_stream_123} LineLength (% &&end XMP Packet marker&&) metastring_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
Purchased from Demo (abedemo.tizrapublisher.com) for the exclusive use of unknown. © 2025 Demo. Please report unauthorized use to pirate@tizra.com