home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
laser
/
postprn.arc
/
PORT.PS
< prev
next >
Wrap
Text File
|
1989-06-09
|
2KB
|
102 lines
%!
%
% Portrait Page Printer
%
/inch {72 mul} def
/pageheight 11 inch def
/pagewidth 8.5 inch def
/lmarg .3 inch def
/bmarg .3 inch def
/tmarg pageheight .4 inch sub def
/lincr 11.4 def
/x lmarg def
/y tmarg def
/xw 0 def
/yw 0 def
/s 1000 string def
/ones 1 string def
/lastFF 0 def % last type of form-feed
/page_text 0 def % no text yet
/undershow
{ currentlinewidth exch
dup show currentpoint 3 2 roll
stringwidth exch neg exch
0 -2 rmoveto rlineto 0.6 setlinewidth stroke
moveto setlinewidth
} 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
{
showpage
/page_text 0 def
/x lmarg def
/y tmarg def
/xw 0 def
x y moveto
}
{
%
% 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
{
page_text 1 eq
{ showpage } if
/page_text 0 def
/x lmarg def
/y tmarg def
/xw 0 def
x y moveto
} if
} ifelse
/lastFF curFF def
} def
/normal-font /Courier findfont 12 scalefont def
/bold-font /Courier-Bold findfont 12 scalefont def
/italic-font /Courier-Oblique findfont 12 scalefont def
/bolditalic-font /Courier-BoldOblique findfont 12 scalefont def
/isbold 0 def
/isitalic 0 def
/lineprint
{
normal-font setfont
{currentfile s readline
{ x y moveto
showline
/x lmarg def
/y y lincr sub def
y bmarg lt
{0 2 doFF } if
}
{
page_text 1 eq
{1 0 doFF} if
exit
} ifelse
} loop
} def
lineprint