How do I get Chromium to show PDFs using Evince?

Is there any way to get Chromium to use a mozpluggerrc/evince combination to show PDFs embedded into its own window? Right now, Chromium is just downloading PDFs. I can open them in an external evince window by clicking on the downloaded file.

I am using Chrome 18.0.1025.168 under Ubuntu 12.04 (amd64). Here's the pdf section of my /etc/mozpluggerrc.d/62-documents.conf:

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
    repeat noisy swallow(evince) fill needs_xembed: evince "$file"

mozpluggerrc does show up in about:plugins.

BTW, this works just fine in Firefox.

Note: I am not looking for hints on how to use Google Chrome's PDF plugin in Chromium.


Solution 1:

In /etc/mozpluggerrc.d edit the 40-global_defs.conf and add

### Evince
define(EVINCE, [repeat swallow(evince) fill needs_xembed: evince "$file"])

Now in /etc/mozpluggerrc.d/62-documents.conf , the GV() & ACROREAD() (not necessary though) needs to be replaced with EVINCE() as

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file

EVINCE() << previously ACROREAD()

    repeat noisy swallow(Xpdf) fill needs_xembed: xpdf -g +9000+9000 "$file"
    repeat noisy swallow(okular) fill needs_xembed: okular "$file"
        repeat noisy swallow(epdfview) fill needs_xembed: epdfview "$file"

EVINCE() << previously GV()

    repeat noisy swallow(evince) fill needs_xembed: evince "$file"

Save and try opening PDF files in Chromium , it will open with evince.

Thanks to this Original Source