Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 12:34:29 -0500 (EST)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        freebsd-questions@FreeBSD.ORG (FreeBSD Questions)
Subject:   Manpage to PS and Printer Control
Message-ID:  <199901151734.MAA00481@cc942873-a.ewndsr1.nj.home.com>

next in thread | raw e-mail | index | archive | help
I know I've seen this a zillion times, but when you want to actually
do it, you can never figure it out or find the reference...

I want to convert some manpages to PostScript for printing. I thought
it would be as easy as,

% gunzip -c /usr/local/man/cat1/<command>.gz | groff | lpr

However, I wrote to a test file first rather than to the printer. I
took a look with ghostview and the ps file is really messed up. It's
obviously the right file, but weird stuff going on.

As an aside, I tried to print the man pages with just,

% man <command> | lpr

And the output looks pretty good (underlines in place, etc.), but for
some reason my printer likes doing it in landscape. My printcap for
the printer (an HP PostScript printer with JetDirect card) is just,

lp|hall:\
        :sh:\
        :rm=hall:rp=raw:\
        :sd=/var/spool/output/hall:lf=/var/log/lpd-errs:\
        :if=/usr/local/libexec/hpif:

And the hpif is just a filter from the handbook that prevents HPs from
stair-stepping,

#!/bin/sh
#
# hpif - Simple text input filter for lpd for HP-PCL based printers
# Installed in /usr/local/libexec/hpif
#
# Simply copies stdin to stdout.  Ignores all filter arguments.
# Tells printer to treat LF as CR+LF. Writes a form feed character
# after printing job.                        

printf "\033&k2G" && cat && printf "\f" && exit 0                      
exit 2

Anyone help with that?

I'd really appreciate help on manual pages to PostScript. Figuring out
my printer problem would just be a bonus. ;)
-- 
Crist J. Clark                           cjclark@home.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901151734.MAA00481>