home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
postprn.arc
/
PORT4.PS
< prev
next >
Wrap
Text File
|
1989-06-02
|
3KB
|
158 lines
%!
%
% Four-Up Portrait Page Printer
%
/inch {72 mul} def
/pageheight 11 inch def
/pagewidth 8.5 inch def
/ttop 10.7 inch def
/tbot 5.6 inch def
/btop 5.4 inch def
/bbot .3 inch def
/lleft .3 inch def
/rleft 4.35 inch def
/lmarg lleft def
/tmarg ttop def
/bmarg tbot def
/lincr 5.6 def
/x lmarg def
/y tmarg def
/pg 0 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
{ currentlinewidth exch
dup show currentpoint 3 2 roll
stringwidth exch neg exch
0 -2 rmoveto rlineto 0.4 setlinewidth stroke
moveto setlinewidth
} def
/dolines
{
gsave
.1 setlinewidth
newpath
.2 inch 5.5 inch moveto
8.3 inch 5.5 inch lineto
4.33 inch .2 inch moveto
4.33 inch 10.8 inch lineto
stroke
grestore
} def
/doFF
{
%
% Takes 2 arguments.
% Top: type of FF encountered, be it a reall FF, bottom of page,
% or what-not.
% Next: force the FF or only if stuff on page.
%
/curFF exch def
1 eq
{
dolines
showpage
/page_text 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 lmarg eq % Still at left margin
y tmarg 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 lleft def
/tmarg btop def
/bmarg bbot def
}
{
pg 1 eq
{
/pg 2 def
/lmarg rleft def
/tmarg ttop def
/bmarg tbot 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
} if
} ifelse
/lastFF curFF def
/x lmarg def
/y tmarg def
/xw 0 def
x y moveto
} def
/normal-font /Courier findfont 6 scalefont def
/bold-font /Courier-Bold findfont 6 scalefont def
/italic-font /Courier-Oblique findfont 6 scalefont def
/bolditalic-font /Courier-BoldOblique findfont 6 scalefont def
/isbold 0 def
/isitalic 0 def
/lineprint
{
normal-font setfont
x y moveto
{i s readline
{
x y moveto % go to start of line
showline % show the line on the stack
/x lmarg def % reset x to left margin
/y y lincr sub def % increment line
y bmarg lt % new page if end of page?
{ 0 2 doFF } if
}
{
page_text 1 eq
{1 0 doFF} if
exit
} ifelse
} loop
} def
lineprint