2 % Copyright (C) 1995 Aladdin Enterprises. All rights reserved.
4 % This software is provided AS-IS with no warranty, either express or
7 % This software is distributed under license and may not be copied,
8 % modified or distributed except as expressly authorized under the terms
9 % of the license contained in the file LICENSE in this distribution.
11 % For more information about licensing, please refer to
12 % http://www.ghostscript.com/licensing/. For information on
13 % commercial licensing, go to http://www.artifex.com/licensing/ or
14 % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
15 % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
17 % $Id: caption.ps,v 1.4 2002/02/21 21:49:28 giles Exp $
18 % Add a "caption" to the bottom of each page.
21 { /Helvetica //captionsize selectfont
22 (Printed by Aladdin's XXYYZZ) show
23 /Symbol //captionsize selectfont
24 (\324) show % trademarkserif
25 /Helvetica //captionsize selectfont
33 pop exch 36 add /by exch def
34 % We can't use stringwidth, so we have to show and measure.
37 0 0 moveto caption currentpoint pop /bw exch def
39 add bw sub 2 div /bx exch def
40 % We don't have the font bbox available, so we guess.
41 /bh captionsize 1.05 mul def
46 //bx 9 sub //by 9 sub //bw 18 add //bh 18 add
47 1 setgray 4 copy rectfill 0 setgray 1.5 setlinewidth rectstroke
48 //bx //by moveto //caption exec
52 /showcaption load /exec load
53 currentpagedevice /EndPage get /exec load