Hello.
I use the command line
$ man -t setfont | lpr
to print the manual page for setfont. But the command "man -t setfont" outputs a PostScript file formated for letter paper.
How can I get it to format for A4 paper?
Regards.
Romildo
On Tue, Sep 07, 2004 at 07:32:38PM -0300, romildo@uber.com.br wrote:
I use the command line
$ man -t setfont | lpr
to print the manual page for setfont. But the command "man -t setfont" outputs a PostScript file formated for letter paper.
How can I get it to format for A4 paper?
With some help and some searching, I came to this solution:
The groff home page (http://www.gnu.org/software/groff/groff.html), in the section "macro packages", tells about the option "-dpaper=<size>" available to groff through the papersize.tmac file.
It is enough to edit /etc/man.conf and add the options "-dpaper=a4 -P-pa4" to the line which reads "TROFF/usr/bin/groff -Tps -mandoc", which becomes:
TROFF /usr/bin/groff -Tps -dpaper=a4 -P-pa4 -mandoc
With this setup, the command "man -t setfont" will output a PostScript file formatted for A4 paper by groff.
This solution is better than using enscript because it does typography considerations (by groff) when producing the output.
Regards.
Romildo
Maybe "mpage" could be of help. You can use it as a filter this way:
$ man -t setfont | mpage -b A4 -1 | lpr
the "-b A4" option is self-explanatory. The "-1" option means "a single page on a sheet", otherwise the default behaviour of mpage is "four pages on a sheet", not very easy to read.
Unfortunately, mpage has several other defaults that you probably want to turn off (borders, datestamps and such). However, you should not have any problem with them, just read the man.
Best regards.
romildo@uber.com.br wrote:
Hello.
I use the command line
$ man -t setfont | lpr
to print the manual page for setfont. But the command "man -t setfont" outputs a PostScript file formated for letter paper.
How can I get it to format for A4 paper?
Regards.
Romildo