Article View: comp.lang.postscript
Article #7017Re: GreyBar Postscript Program anyone ?
From: Ken Keirnan
Date: Wed, 23 Mar 1988 22:27
Date: Wed, 23 Mar 1988 22:27
49 lines
2304 bytes
2304 bytes
In article <7978@cisunx.UUCP> wpnst@cisunx.UUCP (Bill 'Deus' Nixon) writes:
>
>At our site we currently have one Xerox 9700 laser printer and four Dec
>LPS40 laser printer (Postscript). On the x97, there is a way to have
>the page printed with an overlay of grey shaded bars every other inch on
>the page horizontally.
>
>I know very little Postscript, but would like to be able to prepend a
>file to a existing Postscript file that would add the grey bars like on
>the x97.
[ text deleted ]
Bill, the following PostScript routine may do what you want. Just load
the routine ahead of you other files and put the word "graybar" at the
top of each page. The shade of gray can be set by modifying the line:
0.95 setgray...
between 0 (black) and 1 (white).
Ken Keirnan
-------------------------- CUT HERE ----------------------------
% graybar - Place a 1 inch gray bar at 2 inch intervals on a page.
% This routine should be run at the start of each page.
/graybar {
gsave
currentgray
0.95 setgray % set gray level to light gray
1 2 9 { % loop for 1 to 9 step 2
/V exch 72 mul def % convert each step to inches
0 V moveto % move to lower left corner
0 72 rlineto % draw a rectangle 1 X 8 1/2 inches
612 0 rlineto
0 -72 rlineto
closepath
fill % fill the rectangle with gray
} for
0 0 moveto % back to the origin
setgray % restore gray level (saved with currentgray)
grestore
} def
+----------------------------------------------------------------+
| Ken Keirnan Pacific Bell - Minicomputer Support Staff |
+----------------------------------------------------------------+
| old {ames,ihnp4,lll-crg,dual,pyramid}!ptsfa!pbhyf!kjk |
| new {ames,ihnp4,lll-crg,dual,pyramid}!pacbell!pbhyf!kjk |
+----------------------------------------------------------------+
Technical Details
Message-ID:
<3011@pbhyf.PacBell.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!pacbell!pbhyf!kjkReferences:
<7978@cisunx.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!pacbell!pbhyf!kjk From: kjk@pbhyf.PacBell.COM (Ken Keirnan) Newsgroups: comp.lang.postscript Subject: Re: GreyBar Postscript Program anyone ? Message-ID: <3011@pbhyf.PacBell.COM> Date: 23 Mar 88 22:27:53 GMT References: <7978@cisunx.UUCP> Reply-To: kjk@pbhyf.UUCP (Ken Keirnan) Organization: Pacific * Bell, San Ramon, CA Lines: 49