There are various odds and sods in Google Chrome which are exempt from inclusion in the fully open-source development version Chromium.
This howto explains how to install community supported Chromium Web browser on CentOS 6.x and Red Hat 6.x (RHEL 6). Chromium is an alternative solution to those who could not install Google Chrome browser. Chromium OS is an open-source project that aims to build an operating system that provides a fast, simple, and more secure computing experience for people who spend most of their time on the web.
Integrated Flash is one and Chrome’s new native PDF reader is another.
The reasons for this are, as Linux users you can probably guess, down to licensing issues.
If you desperately want to use it there is, what we like to call, a hack around, courtesy of an awesome dude going by the moniker of f.Zweig*
How to use Google Chrome’s Native PDF reader in Chromium
1. Download the latest Google Chrome dev build (yes Google Chrome) choosing to save it.
2. Having saved the correct package above proceed to right click > extract
3. Enter the extracted folder and proceed to right click > Extract the ‘data.tar.gz’
4. Navigate to data/opt/google/chrome and locate ‘libpdf.so’
5. Copy the above file to /usr/lib/chromium-browser/ (You may need to run a root nautilus window for this. Press ALT+F2 and type ‘gksu nautilus /usr/lib/chromium-browser/’ minus the apostrophes.)
6. Start Chromium and type ‘about:plugins’ into the address bar
7. Search for”Chrome PDF Viewer (2 files)” and click the ‘Enable’ option.
Updated Method
If the above method looks a little complicated then don’t worry – there’s a quicker way to get up and running.
First follow step 1 but install Google Chrome rather than extract it.
Then run the following command (assuming you also have Chromium installed) in a new Terminal window:
- sudo ln -s /opt/google/chrome/libpdf.so /usr/lib/chromium-browser/
Finally, open Chromium and follow steps 6 & 7 to enable the PDF reader.
*Additional thanks to Mathias Böhmer
13 Aug 2011CC (ASA 3U)
Prior to today, I had been using
acroread
to view PDF files in Chromium, which is embedded through MozPlugger and some tricks. However, it will open up a new window sometimes and it’s always slow. This article will enable PDF viewing in Chromium using two methods.KParts Plugin
At first, I referenced this page and found the KParts Plugin.
I
wget
the source code tarball, uncompress it, and type cmake .
in my terminal according to the README.txt. It checks for dependencies and reports an error “Qt qmake not found!
”Type
qmake
directly in the terminal and it runs, so it is actually reachable buy CMake
cannot find it. After some searches, I finally found this bug in Launchpad: “[Natty] CMake: FindQt4 doesn’t work if qt3-dev-tools are installed”.The only work-around is to
apt-get remove qt3-dev-tools.
cmake .
again and I get another error reported saying “cmake/modules/FindKDE4Internal.cmake not found”. It is resolved in this post, which also provides some useful techniques like apt-file search
.After
cmake .
gets through, type make
and sudo make install
. KParts Plugin will be installed at /usr/lib/nsbrowser/plugins/ in my laptop. Then just:Now you can view PDF files in Chromium and KParts Plugin works perfectly. However, there is always a bar on the top of the embedded Okular.
Chrome’s libpdf.so
Chrome has native support for PDF files, but it is not available officially in Chromium. You may
wget
one of the following packages, uncompress it, and find libpdf.so in opt/google/chrome/.On my laptop (Chromium 13.0.782.109, Ubuntu 11.04), I have to use package
google-chrome-stable_current_i386.deb
.Then do something like:
You may have to try both the stable and the unstable releases and copy the file libpdf.so to your Chromium installation directory, and navigate to
about:plugins
to enable Chrome PDF Viewer.Now you should get the PDF viewer working perfectly in Chromium, exactly the same as in Google Chrome.