laser-lovers@ucbvax.UUCP (11/22/85)
The LaserWriter does not have any built-in definition for the A4 paper size. This oversight is corrected in more recent PostScript printers, including the QMS-PS 800 and the DataProducts LZR 2665; these printers select an A4 "page type" automatically if an A4 paper tray is installed. A future revison of the LaserWriter will work this way as well. The PostScript program fragment at the end of this message may be used to define an A4 paper size. This definition may either be included at the beginning of a job or downloaded permanently. It must be invoked explicitly. Automatic selection of A4 paper size according to the paper tray installed also requires making a change to the "setpaper" procedure in serverdict. This program is specific to the LaserWriter and does not work in any other printer. While the "framedevice" operator is a standard part of the PostScript language, the various magic numbers and undocumented operators appearing in the procedure passed to "framedevice" are machine-dependent and deal with specific features of the Canon LBP-CX engine. The engine itself has various restrictions on how close the image can come to the edge of the paper; the minimum margins are different for each of the four edges. These restrictions are dealt with by the various margin parameters and by the translation component of the default transformation matrix. Regarding Chris Thompson's question about the operator named "frametoroket": this name is included in the LaserWriter to provide material for archaeologists. It is a relic of an early implementation of the PostScript interpreter. In that implementation, the printer was controlled through an interface called a ROKET (rhymes with "pocket"), a scan-line buffer for a SUN workstation. I do not know exactly what ROKET stands for, though I believe the first two letters stand for "Raster Output". Somehow this name persisted into the LaserWriter implementation long after the original hardware had fallen into disuse. Ed %! % device setup for A4 paper size % MACHINE-DEPENDENT -- works in LaserWriter rev. 0 (PS 23.0) only!! % last edit: taft Sat Oct 5 13:43:12 1985 /a4 % full A4 size (~.25 inch margins all sides) [ [300 72 div 0 0 -300 72 div -72 3436 % 3365 + 71 ] % device width in bytes and height in bits: 292 3365 % extra action to take at end of showpage: {statusdict /jobstate (printing) put 0 setblink % frametoroket takes: top left. top is in bits (1/300 of an inch) and % left is in bytes (8/300 of an inch). margins % margins gets us to the top and left edges of the paper; now add % default top and left margins to center the image on the paper. exch 142 add exch 256 add 8 div round cvi frametoroket statusdict /jobstate (busy) put 1 setblink } % Now do it: /framedevice load % halftone screen definition % screen frequency; angle; spot function: 60 45 {dup mul exch dup mul add 1.0 exch sub} /setscreen load {} /settransfer load /initgraphics load /erasepage load ] cvx statusdict begin bind end readonly def /a4small % small A4 size (~.42 inch margins all sides) [ [300 72 div 0 0 -300 72 div -120 3381 % 3255 + 126 ] % device width in bytes and height in bits: 280 3255 % extra action to take at end of showpage: {statusdict /jobstate (printing) put 0 setblink % frametoroket takes: top left. top is in bits (1/300 of an inch) and % left is in bytes (8/300 of an inch). margins % margins gets us to the top and left edges of the paper; now add % default top and left margins to center the image on the paper. exch 196 add exch 304 add 8 div round cvi frametoroket statusdict /jobstate (busy) put 1 setblink } % Now do it: /framedevice load % halftone screen definition % screen frequency; angle; spot function: 60 45 {dup mul exch dup mul add 1.0 exch sub} /setscreen load {} /settransfer load /initgraphics load /erasepage load ] cvx statusdict begin bind end readonly def