Article View: comp.windows.ms
Article #12362Re: possible to print a text border?
From: Lance R. Bailey
Date: Thu, 30 May 1991 10:28
Date: Thu, 30 May 1991 10:28
73 lines
2999 bytes
2999 bytes
>Is there some way to extend the header/footer "concept" to include text
>running along the left & right sides of the page ... basically a text border?
well i did this in w4dos a wwhile back, w4w is just out of the box so i'll have
to assume that you can do the same.
create a running head/footer which contains a graphic image (i use PostScript
code, hand written). When the running is printed, so is the graphic.
I used this to create "SECTION N" in black-on-white text down the edge of the
paper. I had two running heads, one for even pages (text on left) and one
for odd pages (text on the right).
the following is the PostScript to do it,
%!
/lrbfh 8 def
/Courier findfont lrbfh scalefont setfont
/Helvetica findfont lrbfh scalefont setfont
/lrbboxwidth (a) stringwidth pop 4 add def
/lrbbordershow % [ leftside | string
{ /lrbstr exch def
/lrbleftside exch def
lrbstr dup length 1 sub get 48 sub 72 mul 738 exch sub /lrby exch def
0.2 setgray
lrbleftside
{ newpath
/lrbx 18 lrbboxwidth add def
lrbx lrby moveto
lrbboxwidth -1.5 mul 0 rmoveto
lrbboxwidth 2 mul 0 rlineto
lrbstr length 1 sub lrbfh mul lrbfh 0.3 mul add neg 0 exch rlineto
lrbboxwidth -2 mul 0 rlineto closepath
gsave fill grestore 0 setgray 0 setlinewidth stroke
}
{ newpath
/lrbx 594 lrbboxwidth sub def
lrbx lrby moveto
lrbboxwidth 1.5 mul 0 rmoveto
lrbboxwidth -2 mul 0 rlineto
lrbstr length 1 sub lrbfh mul lrbfh 0.3 mul add neg 0 exch rlineto
lrbboxwidth 2 mul 0 rlineto closepath
gsave fill grestore 0 setgray 0 setlinewidth stroke
}
ifelse
0 setgray % black (swap these lines to play with
1 setgray % white black on white or white on black)
/lrbcc (0) def
lrbx lrby moveto
{ exch pop lrbx lrby moveto 0 lrbfh neg rmoveto
currentpoint /lrby exch def /lrbx exch def
lrbcc exch 0 exch put lrbcc stringwidth pop 2 div neg 0 rmoveto
} lrbstr kshow
} def
/lrbleftborder { true exch lrbbordershow } def
/lrbrightborder { false exch lrbbordershow } def
( SECTION 1) lrbleftborder
--
Lance R. Bailey Systems Manager box: Robarts Research Institute
email: lrb@rri.uwo.ca Clinical Trials Resources Group
fax: 519.663.3789 P.O. Box 5015, 100 Perth Dr.
vox: 519.663.3787 ext. 4108 London, Canada N6A 5K8
Technical Details
Message-ID:
<3175@ria.ccs.uwo.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ria!alex.ctrg.rri.uwo.ca!lrbReferences:
<3525@travis.csd.harris.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ria!alex.ctrg.rri.uwo.ca!lrb From: lrb@alex.ctrg.rri.uwo.ca (Lance R. Bailey) Newsgroups: comp.windows.ms Subject: Re: possible to print a text border? Message-ID: <3175@ria.ccs.uwo.ca> Date: 30 May 91 10:28:13 GMT References: <3525@travis.csd.harris.com> Sender: news@ria.ccs.uwo.ca Distribution: na Organization: CTRG, Robarts Research Institute London, Canada Lines: 73