[ale] Printer question

Joe Steele joe at madewell.com
Thu Apr 26 18:52:55 EDT 2001


Presuming that your printing involves ghostscript, one possibility 
would be to use the following postscript file (caption.ps) to add a 
timestamp at the top of all pages (it's a hacked version of a file 
which comes with ghostscript).

Sample command line usage:

gs "-stimestamp=`date`" /.../caption.ps <other_postscript_file.ps>

Whatever text is assigned to 'timestamp' will print at the top of all
pages (in this example it's the output from the date command).

Your print system probably has some place where you can define the extra 
ghostscript options (i.e., "-stimestamp=`date`" /.../caption.ps) 
that will automatically invoke the script.  

The postscript could probably stand to be refined a bit more...

--Joe

--- caption.ps ---
%!
%    Copyright (C) 1995 Aladdin Enterprises.  All rights reserved.
% 
% This file is part of Aladdin Ghostscript.
% 
% Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
% or distributor accepts any responsibility for the consequences of using it,
% or for whether it serves any particular purpose or works at all, unless he
% or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
% License (the "License") for full details.
% 
% Every copy of Aladdin Ghostscript must include a copy of the License,
% normally in a plain ASCII text file named PUBLIC.  The License grants you
% the right to copy, modify and redistribute Aladdin Ghostscript, but only
% under certain conditions described in the License.  Among other things, the
% License requires that the copyright notice and this notice be preserved on
% all copies.

% $Id: caption.ps,v 1.1 2000/03/09 08:40:39 lpd Exp $
% Add a "caption" to the bottom of each page.

% modified 4/26/01 by jws:
% caption size, position (top & center)
% eliminated border
% uses the contents of 'timestamp' as caption text
% sample usage:  gs "-stimestamp=`date`" caption.ps <filename.ps>

/captionsize 8 def
/caption
 { /Helvetica //captionsize selectfont
   //timestamp show
 } bind def

10 dict begin
gsave
  initgraphics
  clippath pathbbox
                % We don't have the font bbox available, so we guess.
  captionsize 1.05 mul dup /bh exch def
  sub 10 sub /by exch def exch pop
                % We can't use stringwidth, so we have to show and measure.
  gsave
    0 0 0 0 rectclip
    0 0 moveto caption currentpoint pop /bw exch def
  grestore
  add bw sub 2 div /bx exch def
grestore
/showcaption
 { gsave
     initgraphics
     //bx 9 sub //by 9 sub //bw 18 add //bh 18 add
     1 setgray
%forget the box
% 4 copy 
rectfill 
0 setgray
% 1.5 setlinewidth rectstroke
     //bx //by moveto //caption exec
   grestore
 } bind def
<< /EndPage [
   /showcaption load /exec load
   currentpagedevice /EndPage get /exec load
   ] cvx
>> setpagedevice
end

--- end of caption.ps ---

-----Original Message-----
From:	Matthew Brown [SMTP:matthew.brown at cordata.net]
Sent:	Thursday, April 26, 2001 12:30 PM
To:	ale at ale.org
Subject:	RE: [ale] Printer question

RE: [ale] Printer questionIt's the HP 1100Axi.  I think it does all the PCL
stuff the other HP's use.



Matthew Brown
CorData
=================================
O:   (770) 795-0089
F:   (770) 234-5302

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list