Tuesday, May 15, 2012

Making Chromium View PDFs

Chromium by default has no built-in PDF viewer unlike its cousin Google Chrome. I am not really certain why the hell this is, but it is. This is the easiest way that I could get this to work on Fedora (sometimes I wish I was back in Arch).

  1. Install Google Chrome. 
  2. Yeah I know, just trust me here, besides we only need one file, libpdf.so.
    sudo yum -y install google-chrome-stable

  3. After Chrome is installed, copy the libpdf.so file out of /opt/google/chrome to Chromium
    sudo cp /opt/google/chrome/libpdf.so /usr/lib64/chromium-browser/plugins/

  4. Go ahead and change the file permissions on libpdf.so to 755.
    sudo chmod 755 libpdf.so

  5. Now open Chromium and go to chrome://plugins. You should see a plugin called libpdf. Mine was enabled at this point but if your's is not, then do so.

  6. That's it!
See that wasn't too hard was it?

A side note you should be aware of, in this format libpdf.so will not get updated. So it might be a good idea to do so manually every once and a while. Or you can leave Chrome installed and create a symlink to the chromium install for libpdf.so. 

No comments:

Post a Comment