home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
postprn.arc
/
PORT2.PS
< prev
next >
Wrap
Text File
|
1989-06-09
|
2KB
|
125 lines
%!
%
% Two-Up Portrait Page Printer
%
/inch {72 mul} def
/pageheight 8.5 inch def
/pagewidth 11 inch def
/p0 .3 inch def
/p1 5.54 inch def
/pg 0 def
/lmarg p0 def
/tmarg .3 inch def
/bmarg pageheight .3 inch sub def
/lincr 8.7 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
{ currentlinewidth exch
dup show currentpoint 3 2 roll
stringwidth neg
2 0 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
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 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 p1 def
}
{
/pg 0 def
/lmarg p0 def
dolines
showpage
/page_text 0 def
} ifelse
} if
} ifelse
/x tmarg def
/y lmarg def
/xw 0 def
/lastFF curFF def
} def
/normal-font /Courier findfont [0 7.75 -7.75 0 0 0] makefont def
/bold-font /Courier-Bold findfont [0 7.75 -7.75 0 0 0] makefont def
/italic-font /Courier-Oblique findfont [0 7.75 -7.75 0 0 0] makefont def
/bolditalic-font /Courier-BoldOblique findfont [0 7.75 -7.75 0 0 0]
makefont def
/isbold 0 def
/isitalic 0 def
/lineprint
{
normal-font setfont
5 setlinewidth
{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