Using Firefox (PDF.js) as default pdf viewer

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Using Firefox (PDF.js) as default pdf viewer

#1 Post by mcewanw »

Details here:

http://www.murga-linux.com/puppy/viewto ... 822#949822
Since around version 19, firefox has internal pdf viewer (PDF.js). To activate it just go to Preferences -> Applications. Then click on the line for Portable Document Format (PDF) and use provided drop down arrow to select "Firefox Preview" instead of epdfviewer (default) or whatever.

...You can also then drop local pdf files onto Firefox and they will open in Firefox. Works well. In fact I've right-clicked pdf file in PCmanFM and chosen to "Open With...": Firefox. That actually makes Firefox the default pdf viewer for all pdf files (online and local). Associating files using PCmanFM "Open With..." automatically modifies the pdf mine-type entry in $HOME/.config/mimeapps.list in XenialDog32. On some other distributions that file can be elsewhere: for example, in $HOME/.local/share/applications.
William
github mcewanw

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

#2 Post by Galbi »

The PDF.js online demo here:
https://mozilla.github.io/pdf.js/web/viewer.html
allows to load a locally stored PDF file. Also printing it.

Works fine thou you need internet connection.

Saludos.
Remember: [b][i]"pecunia pecuniam parere non potest"[/i][/b]

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#3 Post by watchdog »

This workaround does not work for me using palemoon.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#4 Post by mcewanw »

Sorry, I don't currently have Palemoon to try it. I'll check later. You certainly don't need an internet connection to use Firefox as a pdf reader for local pdf files. Does Palemoon come with PDF.js (i.e. can it open online pdf files without using an external app?

William
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#5 Post by mcewanw »

watchdog wrote:This workaround does not work for me using palemoon.
A quick check on Palemoon site suggests to me that you may need a PDF.js plugin to have inbuilt local and online pdf viewing in Palemoon, which is available (code based on PDF.js anyway):

https://addons.palemoon.org/addon/moon-pdf-viewer/

Yes, just read in Palemoon release notes than pdf.js code was removed in Nov 2016 from main browser (ver 27), because their pdf.js code wasn't being maintained. That isn't the case for official pdf.js from mozilla, however, it is constantly being updated/maintained - last pdf.js github entry just 3 days ago and I haven't come across a pdf yet that it can't display correctly.

William
github mcewanw

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#6 Post by Burn_IT »

I'm not sure that is a good idea.
Firefox add-ons are going to be restricted soon.
I thought PDF viewing was being integrated into FF anyway and needs no add-on
A stand alone viewer will be FAR smaller and not need a risky internet connection should there be any nasties in the PDF.
"Just think of it as leaving early to avoid the rush" - T Pratchett

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#7 Post by mcewanw »

I give up.
github mcewanw

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#8 Post by Semme »

PM prefs, apps, pdf, action.. "Use Master PDF Editor" >> https://code-industry.net/free-pdf-editor/

Watchdog, which viewer have you found to have satisfactory, low resource rendering with those dated pups?

Image
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

watchdog
Posts: 2021
Joined: Fri 28 Sep 2012, 18:04
Location: Italy

#9 Post by watchdog »

I have always used the default pdf viewer in old puppies. When in troubles with some pdf I use libreoffice. Seldom I use master pdf editor in more recent puppies.

Post Reply