[Techtalk] pdfs and mutt

Conor Daly conor.daly at oceanfree.net
Wed Mar 19 00:16:35 EST 2003


On Mon, Mar 17, 2003 at 03:04:54PM -0500 or so it is rumoured hereabouts, 
Emma Jane Hogbin thought:
> I'd like to be able to open PDFs from mutt. Right now when I try to "v"iew
> a PDF it shows me a stream of text in the mutt window. (Would it make a
> difference if the PDF was sent from a Mac vs. a PC?)
> 
> I've added:
>           .mime.types add the line:
> 
>                application/pdf pdf
> 
>           In .mailcap add the lines:
> 
>                # Use xpdf to view PDF files.
>                application/pdf; xpdf -err %s

My /etc/mailcap has the following line for pdf:

application/pdf; xpdf %s

note the absence of the "-err" switch.  What's that for anyhow?

Found this on mutt-users from some time back:

"mutt will not use the "application/pdf" entry in your
mailcap unless the content-type of the attachment is application/pdf.
Simply having a file name suffix/extension of .pdf is not sufficient.
If the content-type is application/octet-stream, for example, you may
need to use an external program like mutt.octet.filter."

However, since most of the "application/octet-stream" attachments _I_
receive are gzipped logfiles, I've just set an entry to use zcat on them
in my .mailcap  Something like (it's at work):

application/octet-stream; zcat %s; copiousoutput

If most of your PDFs come as "application/octet-stream" and you're
prepared to save and view externally the few _non pdf_
application/octet-stream attachments, you could get away with:

application/octet-stream; xpdf %s

Of course, you _could_ go to the trouble of getting and installing
mutt.octet.filter instead...

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
 11:00pm  up 11 days, 15 min,  0 users,  load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
 11:00pm  up 11 days, 22:30,  1 user,  load average: 0.12, 0.07, 0.01


More information about the Techtalk mailing list