How To Open PDF Files Inside Chromium? How To Open PDF Files Inside Chromium? google-chrome google-chrome

How To Open PDF Files Inside Chromium?


If you look at this Ask Ubunutu question you'll see you can actually use Chrome's PDF viewer with Chromium.

Chrome has a nice PDF plugin that lets you open in the page, but it's not open source so it's not included with Chromium. You could install Chrome and symlink the plugin, then whenever you update Chrome you would also get that updated in Chromium. Alternatively, you could copy the plugin over to Chromium, and uninstall Chrome, but you won't receive updates that way.


Have you tried using PDFjs as a totally javascript based alternative solution?

https://github.com/mozilla/pdf.js

It is relatively new but works on many different examples, maybe it is good enough for your application.


In Linux I think we need mozplugger plugin for viewing pdf files. I just removed and installed mozplugger again (Reference links: http://www.tootips.com/2013/01/how-to-open-pdf-files-inside-chromium.html, http://mozplugger.mozdev.org/ ) and now it seems to work.

In windows we need to install a system pdf reader like acrobat (http://www.adobe.com/in/products/reader.html), as chromium downloads and displays pdf with system PDF viewer (Reference link: http://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome).

An alternative solution is to open the pdf link in default browser with help of node.js using below script.

Install the node.js open module:

$ npm install open

use:

var open = require('open');open('http://www.google.com', function (err) {  if (err) throw err;  console.log('The user closed the browser');});

Reference link: How to use nodejs to open default browser and navigate to a specific URL