[Pine-info] Re: How to create a margin when printing?

Bert Driehuis driehuis at playbeing.org
Fri Aug 25 15:49:46 PDT 2006


On Fri, 25 Aug 2006, Joe(theWordy)Philbrook wrote:


> What I can't seam to find however is a way to suppress the the printing

> of an additional page with one line such as:

>

> request id is hp5650-227 (1 file(s))

>

> Which I don't get when I use pr... Would you happen to know how to ditch

> the request id info page???


Try adding ":sh:" to the /etc/printcap entry for hp5650, or adding the
'-h' option to your invocation of lpr.

I had to look this up in the manual because I've been lugging around my
printcap ever since 1993, changing only the rm and rp options around,
so I haven't had to use -h for thirteen years straight now (before
that, I didn't have Berkeley lpr).

As to making your a2ps options stick, why not use a small script that
you can stick in your path? I rummaged around for an simple example but
only found this rather elaborate gizmo (see attached).

I'm not even sure it worked when I last used it, I rarely print e-mail
these days... The Postscript magic (the three echos) switch a Postscript
printer into duplex-print mode, then nenscript formats it nicely, then
psbook and psnup rearrange the pages so that you only have to fold the
printed stack to get a booklet. The black magic with tr is to make sure
even the dumbest print spoolers recognise the print job as Postscript (I
don't recall if it was Xerox, HP or Nashuatec that got it wrong, but
PostScript printed as plaintext makes for boring reading).

psutils and nenscript are part of the ports collection on FreeBSD, and
are fairly common on Linux and Solaris too.

http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/
http://www.risacher.org/nenscript/

When you find your formatted pages are running off the paper, are you
sure your printer and all your software components are in agreement of
the paper size? The behavior you describe used to be commonplace when a
printer is loaded with A4 paper but configured for Letter size.

This was a trip down memory lane for grampa.
-------------- next part --------------
#!/bin/sh

file=/var/tmp/$$.tmp
cat >$file
( echo '%!PS-Adobe-1.0*' | tr "*" "\015"
echo 'statusdict /setduplexmode known { statusdict begin true setduplexmode end } if'
echo 'statusdict /settumble known { statusdict begin true settumble end } if'
nenscript -G -p- $file | psbook | psnup -2
) | lpr
rm -f $file



More information about the Pine-info mailing list