From owner-freebsd-questions Fri Jan 15 12:54:47 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA10682 for freebsd-questions-outgoing; Fri, 15 Jan 1999 12:54:47 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from alice.gba.oz.au (gba-254.tmx.com.au [203.9.155.254]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA10676 for ; Fri, 15 Jan 1999 12:54:41 -0800 (PST) (envelope-from gjb@acm.org) Received: (qmail 14192 invoked by uid 1001); 15 Jan 1999 20:23:16 -0000 Message-ID: <19990115202316.14191.qmail@alice.gba.oz.au> X-Posted-By: GBA-Post 1.03 20-Sep-1998 X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 Date: Sat, 16 Jan 1999 06:23:15 +1000 From: Greg Black To: cjclark@home.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Manpage to PS and Printer Control References: <199901151734.MAA00481@cc942873-a.ewndsr1.nj.home.com> In-reply-to: <199901151734.MAA00481@cc942873-a.ewndsr1.nj.home.com> of Fri, 15 Jan 1999 12:34:29 EST Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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/.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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message