Printing Display Objects 1. Generating a Print File Attributes: print printdisstyle printdisfile printfile 2. Size and Position 2a. Paper Size Attribute: printsize 2b. Margins 2b(i). For the Object Attributes: printbottom printleft printright printtop 2b(ii). For the Disclaimer Attributes: printdisbottommargin printdisleftmargin printdisrightmargin printdistopmargin 2c. Justification and Size of the Object Attribute: printlayout 2d. Disclaimer Rules Attribute: printdisrulewidth 3. Orientation Attributes: printdisorientation printorientation 4. Color and fonts 4a. Color Attribute: printmode 4b. Fonts Attributes: printdisfont printfont --------------------------------------------------- 1. Generating a Print File Attributes: print printdisfile printdisstyle printfile There are provisions in s for printing an object that is displayed on the screen. On request, s generates a PostScript file, which you can send to a printer. Although room is left for them, scrollbars are not shown, since they would have no use. First, load s, define a positioning function, and construct and show a layout to be used as an example throughout this tutorial: $load s scrûs.SCREEN-34 12 br{w;m}:{w has (`yx;scr-m+Ø`yxs of w);} pû((Ï2)ß99)«É100 ttûtûôp,¢5Ó5Ä >1 2 3Ï¡(d;-d)+¡
`printdisrulewidth of `l `l has (`printdisrulewidth;10; `printlayout;`center; `print;1); `l has (`printdisrulewidth;0); 3. Orientation Attributes: printdisorientation printorientation The "printorientation" and "printdisorientation" attributes pertain to the orientation, landscape or portrait, of the object and the disclaimer, respectively. If printdisorientation is `none or if printdisstyle is `append, the disclaimer orientation is the same as the object orientation. Ø`printorientation `printdisorientation of `l `l has (`printdisorientation;`portrait; `print;1); `l has (`printorientation;`portrait; `print;1); 4. Color and fonts 4a. Color Attribute: printmode The "printmode" attribute allows you to choose the color characteristics of the object, and only the object, in the PostScript file, although of course the actual color will depend upon the printer used. Since we specified the color option for ghostview, you will see full color here when it is specified. The possible values are `mono (black and white, the default), `reverse (black and white reversed), `colorfg (the colors specified by fg attributes, with a white background), and `color. You obtain grayscale by specifying color and printing the PostScript file on a non-color printer. `printmode of `l `l has (`printmode;`reverse; `print;1); `l has (`printmode;`colorfg; `print;1); `l has (`printmode;`color; `print;1); 4b. Fonts Attributes: printdisfont printfont The "printdisfont" attribute specifies the font used for the disclaimer: `printdisfont of `l `l has (`printdisfont;'times-roman-12'; `print;1); The "printfont" attribute specifies the printer font to be used for any display font that is unavailable on the printer, such as manfnt.85: `printfont of `l `t has (`font;'manfnt.85'); `l has `print; `l has (`printfont;'palatino-roman'; `print;1); _ex¡ `p`s`d,Øfree `l; To dismiss ghostview, press q with the pointer in its window.