On Sat, Feb 03, 2001 at 10:19:23AM -0000, Jim M. wrote:
> Hi,
> I still get garbage on screen when i open my attachment with extension .pdf 
> and
> type application/octet-stream.
> I am including my:
> mutt.octet.filter in my /usr/loca/bin.
> .mutt_mailcap, .mailcap and .muttrc in the my hime directory: /home/myuserid
> mailcap in /etc.
> 
> I have downlaoded some of these from Dave Pearson's website.
> Couls someone tell me what might be wrong?.

I looked in the mutt.octet.filter file you attached and could find no
support for PDF files.  As Dave clearly says in the header, it's a hack
that works for him, YMMV (your mileage may vary).  So what most folks do
is modify it so that it works for them.  Unfortunately for you, I have
modified my copy so much it is barely recognizable as the same script,
so I can show you what I would do to yours to make it work, but you may
have to do some script debugging.

At the bottom of mutt.octet.filter is a case statement.  Add the
following lines:

        *.pdf )     ShowFileType "$1"; ShowPDF    "$1";;
        *.PDF )     ShowFileType "$1"; ShowPDF    "$1";;

At the top of the file, after the header, are some functions.  Add a new
function like this:

ShowPDF()
{
    acroread "$1" &
    sleep 10
}

The '&' puts acroread in the background so that you can continue using
mutt.  Otherwise, mutt's user interface hangs until you quit acroread.
The 'sleep 10' is an inelegant but easy way to get around some issues
that arise when putting the viewer in the background.

Note that I have not tested this, so I may have made a typo or some
other stupid mistake.

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | RF Communications Product Generation Unit
                             | Spokane, Washington, USA

Reply via email to