Appendix C. Structural comments (DSC)

Navigating within a multi-page PostScript document is based on the analysis of DSC (document structuring conventions) conformant structural comments. Their presence is the prerequisite for proper processing and splitting of the document into its structural units. Prolog Setup Page ... are the expected structural comments (some might be omitted, some repeated).

Prolog – macros, fonts etc., used in the rest of the document. All parts qualified as prolog are interpreted by PS_View only once, after a new or changed document was read in.

Setup – macros, fonts etc., used in the rest of the document. The setup parts preceeding a processed page are interpreted by PS_View each time the page is displayed.

Page – contains elements present for only one page. We assume that no elements present for that particular page influence the contents (interpretation) of other pages. If this condition is not satisfied (and sometimes it really is not!), then the presented image depends on the order in which the pages are being viewed. This can also lead to errors. Within pages we also expect inclusions (e.g., EPS-es), whose structural comments are being skipped.

The DSC comments recognised by PS_View are given below.

%%HiResBoundingBox:%%DocumentMedia:%%BeginSetup%DVIPSEndSection%%Page:%%Page:
%%BeginDocument Inclusion begin (skipping DSC till the inclusion's end)
%%EndDocument Inclusion end (resume DSC interpretation)
%%BoundingBox:
Finding the document bounding box
%%BeginProlog
Prolog begin (setup end, page end)
%DVIPSBeginSection Setup begin (prolog end, page end)
%DVIPSSectionPage:
Page begin (prolog end, setup end, page end)
PROG%%EOF
Document end
endtabular