Document structure convention
|
Document structure convention, or DSC, is a set of standards for PostScript comments which provide additional information and structure to a PostScript document. For instance, since PostScript is a Turing-complete programming language, there is no guaranteed method to determine how many pages long a given document is, or how large a given page is. There is no method to skip to a particular page. The addition of certain DSC comments will provide a document manager the ability to rearrange the pages, print them in any order, or define bounding boxes for each.
DSC comments begin with two percent signs, and consist of a keyword followed by an optional colon, space character and series of arguments. A DSC-conforming document (this one generated by dvips) might begin:
%!PS-Adobe-2.0 %%Creator: dvips(k) 5.95a Copyright 2005 Radical Eye Software %%Title: texput.dvi %%Pages: 1 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentPaperSizes: Letter %%EndComments
DSC version 3.0 was released on September 25, 1992. The specification states, "Even though the DSC comments are a layer of communication beyond the PostScript language and do not affect the final output, their use is considered to be good PostScript language programming style." Thus, most PostScript-producing programs output DSC-conformant comments along with the code.
External link
- Adobe Technical Note 5001: PostScript Language Document Structuring Conventions Specification (http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf) (PDF)