home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
postprn.arc
/
LAND.PS
next >
Wrap
Text File
|
1989-06-02
|
2KB
|
110 lines
%!
%
% Landscape Page Printer
%
/inch {72 mul} def
/pageheight 8.5 inch def
/pagewidth 11 inch def
/lmarg .3 inch def
/tmarg .7 inch def
/bmarg pageheight .7 inch sub def
/lincr 7.8 def
/x tmarg def
/y lmarg def
/xw 0 def
/yw 0 def
/i currentfile def
/s 1000 string def
/ones 1 string def
/lastFF 0 def
/page_text 0 def % no text on this page
/undershow
%
% string undershow
%
% do a "string show" then underline the string
%
{
currentlinewidth exch
dup show currentpoint 3 2 roll
stringwidth neg
2 0 rmoveto rlineto 0.4 setlinewidth stroke
moveto setlinewidth
} def
/doFF
%
% Takes 2 arguments:
%
% Top: Type of FF encountered (0 = whatever 1=char 2=margin)
% Next: Force showpage anyways?
%
{
/curFF exch def
1 eq
{
showpage
/page_text 0 def
/x tmarg def
/y lmarg def
/xw 0 def
/yw 0 def
}
{
%
% if FF right after last line on page, ignore FF
%
curFF 1 eq % This is FF?
lastFF 2 eq % Last was type 2 -- margin
x tmarg eq % Still at left margin
y lmarg eq % Still at top margin
and and and false eq % Do it if all the above is false
{
page_text 1 eq
{ showpage } if
/page_text 0 def
/x tmarg def
/y lmarg def
/xw 0 def
/yw 0 def
} if
} ifelse
/lastFF curFF def
x y moveto
} def
/normal-font /Courier findfont [0 9 -9 0 0 0] makefont def
/bold-font /Courier-Bold findfont [0 9 -9 0 0 0] makefont def
/italic-font /Courier-Oblique findfont [0 9 -9 0 0 0] makefont def
/bolditalic-font /Courier-BoldOblique findfont [0 9 -9 0 0 0] makefont def
/isbold 0 def
/isitalic 0 def
/lineprint
{
normal-font setfont
{i s readline
{
x y moveto
showline
/y lmarg def
/x x lincr add def
x bmarg gt
{ 0 2 doFF } if
}
{
page_text 1 eq
{1 0 doFF} if
exit
} ifelse
} loop
} def
lineprint