Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Just one other thing: about:plugins also correctly lists the application/pdf, application/x-pdf, text/pdf, and text/x-pdf mimetypes in the mozplugger section. –  potofcoffee Jul 13 '12 at 14:07
    
Okay, that gets me one step further. Now chromium opens the PDF in an external evince window. Is there any way to get this working as an embedded evince? BTW, the EVINCE() macro is defined as follows in both /etc/mozpluggerrc and /etc/mozpluggerrc.d/40-global_defs.conf: define(EVINCE, [repeat swallow(evince) fill needs_xembed: evince "$file"]) –  potofcoffee Jul 13 '12 at 14:36
    
That line is already there (see my comment above) and doesn't change anything. I played around with the parameters, but so far haven't found anything that changes the behavior. –  potofcoffee Jul 13 '12 at 14:46
    
Please put all this information in your question instead of buried in the comments! –  Jorge Castro Jul 13 '12 at 18:01

1 Answer 1

up vote 7 down vote accepted

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

share|improve this answer

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.