embedding evince in Chrome

One of the big problems with Google Chrome is the lack of inline PDF support on most platforms. Google has added preliminary support for PDF to Chromium but so far it has not come to Linux. It may come tomorrow, but until then, users who would like to avoid using acroread may use the following hack, at least on Ubuntu Lucid. As always, your mileage may vary.

The fix is a simple tweak to the /etc/mozpluggerrc file:

### Acrobat Reader
#define(ACROREAD, [repeat swallow(acroread) fill : acroread -openInNewWindow /a "$fragment" "$file"])
define(ACROREAD, [repeat swallow(evince) fill needs_xembed : evince "$file"])

The commented line is the original. The replacement is what seems to load evince with the file in a tab in chromium-daily right now on Lucid. I installed mozplugger but not acroread. You could make this change other ways; they are left as an exercise to the reader. This will prevent acrobat reader from loading even if it is installed, which some may find desirable. Keystrokes never reach the embedded application, but this will prevent you only from searching within the file. This is annoying! But at least it works, unlike the default means of loading evince via mozplugger.

Thanks for the tip!! Works

Thanks for the tip!! Works with okular too (I'm also on Lucid). define(ACROREAD, [repeat swallow(okular) fill needs_xembed : okular "$file"])

Thanks.

Works for me. Regards from Brazil.

What the deuce

/etc/mozpluggerrc isnt even there!

Whether it is there or not

Whether it is there or not probably depends on whether you've upgraded or installed to get to a recent version of ubuntu. I'll see if I can come up with a more modern edition at some point.

thanks, still works in Ubuntu

thanks, still works in Ubuntu 11.04 and Chromium 14. really nice would be a solution that works in /etc/mozpluggerrc.d/62-documents.conf as /etc/mozpluggerrc shouldn't be edited.

At last!!!

Thanks a lot, it does work after trying to find a lot of different solutions.