Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Members / jhb / Embed pdf viewer in firefox (29+) using mozplugger

Embed pdf viewer in firefox (29+) using mozplugger

by Jörg Baach last modified May 19, 2014 03:19 PM
How to get pdfs embedded in webpages after the upgrade to ubuntu trusty with firefox 29.

Problem

One can preview pdfs in firefox using the built in firefox-pdfjs tool. In my use case I'd rather use evince to see a more 'real' rendering of the pdf. How do I get this to work? I installed mozplugger, but still no luck - embedded pdfs in webpages either don't show at all, or open an external viewer.

Solution

  1. Install mozplugger
  2. Copy /etc/mozpluggerrc to ~/.mozplugger/mozpluggerrc
  3. Modfiy mozpluggerrc to your liking. In my case this means it has a section for pdfs and postscript looking like this:
    application/pdf:pdf:PDF file
    application/x-pdf:pdf:PDF file
    text/pdf:pdf:PDF file
    text/x-pdf:pdf:PDF file
    application/x-postscript:ps:PostScript file
    application/postscript:ps:PostScript file
        repeat noisy swallow(evince) fill: evince "$file"
  4. Make sure you have the right settings in firefox 'about:config':
    1. Change pdfjs.disabled's value to true;
    2. Change plugin.disable_full_page_plugin_for_types's value to an empty value.
  5. Restart firefox

References

Add comment

You can add a comment by filling out the form below. Plain text formatting.

Question: What is 6 times 7?
Your answer: