home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
postprn.arc
/
LAND4.PS
< prev
next >
Wrap
Text File
|
1989-06-02
|
3KB
|
159 lines
%!
%
% Four-Up Landscape Page Printer
%
/inch {72 mul} def
/pageheight 8.5 inch def
/pagewidth 11 inch def
/ttop .3 inch def
/tbot 4.15 inch def
/btop 4.35 inch def
/bbot 8.2 inch def
/lleft .25 inch def
/rleft 5.58 inch def
/lmarg lleft def
/tmarg ttop def
/bmarg tbot def
/lincr 4.25 def
/x tmarg def
/y lmarg def
/pg 0 def
/xw 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
{
currentlinewidth exch
dup show currentpoint 3 2 roll
stringwidth neg
1 0 rmoveto rlineto 0.4 setlinewidth stroke
moveto setlinewidth
} def
/dolines
{
gsave
.1 setlinewidth
newpath
.2 inch 5.55 inch moveto
8.3 inch 5.55 inch lineto
4.25 inch .2 inch moveto
4.25 inch 10.8 inch lineto
stroke
grestore
} 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
{
dolines
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
{
pg 0 eq
{
/pg 1 def
/lmarg rleft def
/tmarg ttop def
/bmarg tbot def
}
{
pg 1 eq
{
/pg 2 def
/lmarg lleft def
/tmarg btop def
/bmarg bbot def
}
{
pg 2 eq
{
/pg 3 def
/lmarg rleft def
/tmarg btop def
/bmarg bbot def
}
{
dolines
showpage
/page_text 0 def
/pg 0 def
/lmarg lleft def
/tmarg ttop def
/bmarg tbot def
} ifelse
} ifelse
} ifelse
/x tmarg def
/y lmarg def
/xw 0 def
/yw 0 def
} if
} ifelse
/lastFF curFF def
} def
/normal-font /Courier findfont [0 4.8 -4.8 0 0 0] makefont def
/bold-font /Courier-Bold findfont [0 4.8 -4.8 0 0 0] makefont def
/italic-font /Courier-Oblique findfont [0 4.8 -4.8 0 0 0] makefont def
/bolditalic-font /Courier-BoldOblique findfont [0 4.8 -4.8 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