Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jan 1999 06:23:15 +1000
From:      Greg Black <gjb@acm.org>
To:        cjclark@home.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Manpage to PS and Printer Control 
Message-ID:  <19990115202316.14191.qmail@alice.gba.oz.au>
In-Reply-To: <199901151734.MAA00481@cc942873-a.ewndsr1.nj.home.com>  of Fri, 15 Jan 1999 12:34:29 EST
References:  <199901151734.MAA00481@cc942873-a.ewndsr1.nj.home.com> 

next in thread | previous 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

The obvious place to start finding out how to print man pages is
in the man page for man.  In there you will find the -t option
discussed, including the correct groff incantation to replace
the one you used if you want to do it by hand.

> And the output looks pretty good (underlines in place, etc.), but for
> some reason my printer likes doing it in landscape.
> [...]
> printf "\033&k2G" && cat && printf "\f" && exit 0                      

Well you could always add a command to put it into portrait mode
as part of your filter.  The sequence is "Esc & l 0 O" -- those
last three characters are a lowercase L, a zero, and uppercase O
which in printf terms is "\033&l0O", so you could make that line

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

-- 
Greg Black <gjb@acm.org>


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?19990115202316.14191.qmail>