On Wed, 01 Mar 2000, -kevin- wrote: > I like using a2ps to do my printing, but I would like to have it > use the date/author/subject for some of the footers and headers. > Has someone already done this? Sure. Simply use a2ps -gEmail > If so, can you show me your 'print_command' setting? I wrote a little wrapper around a2ps, which tries out, whether the mail fits on one page using "a2ps -1" or "a2ps -2". So my print_command is set to a2psmail. Tschoeeee Roland -- * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
#! /bin/sh # # $Id: a2psmail,v 1.1 1999/08/26 17:03:10 roland Exp roland $ # ########################################################################## # # Print a mail using a2ps. If the mail fits on one page, we use "a2ps -1" # otherwise we print two pages on one sheet ("a2ps -2"). # ########################################################################## # # Copyright (C) 1999 Roland Rosenfeld <[EMAIL PROTECTED]> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################## umask 077 #DEBUG="-Pdisplay" tmpdir=${TMPDIR-/tmp}/a2psmail.$$ mkdir $tmpdir || exit 1 trap "rm -rf $tmpdir; exit" 0 1 2 3 15 cat "$@" > $tmpdir/mail env -u LANG a2ps -1 -gEmail -Pvoid $tmpdir/mail 2> $tmpdir/a2ps.out if (cat $tmpdir/a2ps.out | grep -q 'on 1 sheet') then # Mail fits on one page: a2ps -1 -gEmail $DEBUG $tmpdir/mail else # Mail doesn't fit on one page: a2ps -2 -gEmail $DEBUG $tmpdir/mail fi