Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know that I can configure a print command in Mutt via .muttrc, e.g.:

set print=ask-yes
set print_command="..."

But what print command should I use for pretty printing?

Well, a2ps output seems a little bit spartan, even with the -=mail shortcut. It does not support UTF8. There is paps which is described as 'UTF-8 to PostScript converter using Pango' and currently does not include support for margins, or Email layout or something like that.

mp: nice default header. Again no UTF8 support. Default margins are ridiculously small - if you specify wider margins the body text is printed behind the footer.

enscript: -G for fancy page headers is indeed fancy. No UTF8 support.

What do you use in the 21st century to print your mails from Mutt?

(It should support UTF8, DIN A4 output as PS and/or PDF)

share|improve this question
    
I deleted the notes about MIME because mutt does not pipe MIME information to the print_command. Thus, it is not sufficient to test print_commands via the | (pipe) command in mutt. –  maxschlepzig Sep 11 '11 at 10:11

2 Answers 2

up vote 5 down vote accepted

There is also Muttprint. It does support UTF-8 and its output looks decent by default. Muttprint seems to use LaTeX and seems to provide hooks for customization.

Since I am printing mails from different environments I can't use a default printer. Thus I have set it up (via ~/.muttrc) to use a PDF viewer where I can dynamically select a printer:

set print_command="muttprint -P A4 -p TO_FILE:/tmp/$USER.ps
                     && okular /tmp/$USER.ps"

Btw, you can set print_decode inside muttrc to configure if the print_command is able to decode MIME, encodings etc. on its own. By default it is set to yes which is the right setting for commands like muttprint, enscript etc.

Regarding the UTF-8 issues of a2ps, enscript and mp one can just conclude that they should be considered obsolete. Indeed, looking at the project pages they don't seem to be maintained (e.g. last news item of the mp page is from 2002 and it mentions a mailing list located at Sun).

share|improve this answer

You might also consider using paps, which reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend.

share|improve this answer
1  
Please don't just post links for answers: include the relevant detail so people do not have to click through for context... –  jasonwryan May 8 at 6:23
    
Is this better? –  Aaron Massey May 13 at 14:06
    
Yes: thank you. –  jasonwryan May 13 at 18:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.