VSIDO Community

VSIDO Support => Scripts and How To's => How To's => Topic started by: superwow on February 23, 2014, 08:20:05 AM

Title: Lightweight pdf viewers
Post by: superwow on February 23, 2014, 08:20:05 AM
Lightweight pdf viewer comparison

Having used Apple's Preview for years, I will say that it is one of the best reasons to stay with an Apple. I left Apple for other reasons, and now I am on a distro that doesn't ship with a pdf viewer. VSIDO is different than Apple of course, going for both more up to date software (comparison of installed bash on Mac and VSIDO is a good example here), and a more parsimonious, smaller base install. Even with the trimmed size, VSIDO seems to be rolling gangbusters here. Fast install, low low CPU usage. So, in terms of fleshing out my system, I too want to keep out the cruft and stick to a leaner install.

In another thread I made the comment I would like a pdf viewer installed by default since, as a scientist, I am continuously viewing pdfs. They are the medium of transport for scientific journals, regulatory communications, white papers, etc. Most distros I have tried already ship with a pdf viewer, and mostly the viewer does the job. I have never really had to compare them. So, as a first time comparison for me, I thought I would share and save anyone the time it took me. Here's what I found.

The recommended pdf viewers, all lightweight, were mupdf, epdfviewer, xpdf, zathura. Here's what I found.

***   Mupdf   ***
Archive Size: 2,985 kB
Install size: 8,158 kB
Dependencies: libc6, libfreetype6, libjbig2dec0, libjpeg8, libssl1.0.0, libx11-6, libxext6, zlib1g
GUI controls: no
right click: no
Keyboard shortcuts:
q      quit
<shift+r>   rotate clockwise
<shift+h>   fit to height
<shift+w>   fit to width
<shift+g>   go to end
<shift+l>   rotate widdershins/counterclockwise
<alt+b>      go to beginning
<alt+f>      full screen
<alt+j>      go down
<alt+k>      go up
<alt+q>      quit
<alt+i>      inverse colors (good feature!)

"man mupdf" will show all the keybindings.

I like the built in function to invert colors, however, I do not think it can be modified via configuration file. The other two pdf viewers mentioned here are configurable.

Also worth mentioning is the mupdf-tools package, installed separately. Adds security features etc.
Size: 3,060 kB

***   Xpdf
Archive size: 1,427 kB
Install size: 4,584 kB
Dependencies: libc6, libgcc1, libpoppler37, libstdc++6, libx11-6, libxm4, libxt6
GUI controls: yes, a little (they don't suit my taste, but also, I don't like a lot of GUI)
right click: yes
Keyboard shortcuts:
q      quit
"man xpdf" will give you al the keybindings
Compared to the other two pdf viewers, xpdf has the most preconfigured keyboard shortcuts - a LOT. Is very fast despite the early 90's looking gui elements.


***   Zathura
Archive size: 171 kB
Install size: 571 kB
Dependencies: libc6, libcairo2, libgirara-gtk3-1, libglib2.0-0, libgtk-3-0, libmagic1, libpoppler-glib8, libsqlite3-0
right click: no
Keyboard shortcuts:
alt+q      quit
d      split screen
h,l,j,k      scroll left, right, down, up
a      zoom to fit the page 
s      zoom to fit the width of the page 
F5      full screen mode 
"man xpdf" will give you all the keybindings
Compared to mupdf, Zathura has a lot of preconfigured keyboard shortcuts, but not as many as xpdf. On the other hand, there appear to be more options for configuration than the other two. Inverse colors or color replacements can be preconfigured in the config files and keybound. And dang if there are some excellent discussion threads about zathura (http://pwmt.org/projects/zathura/configuration/) modding (https://bbs.archlinux.org/viewtopic.php?id=115118).


***   epdfview
Sorry but I could not find this in the Debian repository.


superwow@rlyeh:~$ apt-cache search epdf
comparepdf - command line tool for comparing two PDF files


Since my whole idea in jumping from #! to VSIDO was because my IT dept at work said #! was not a permitted distro, and that distros can only pull from large vetted repositories (Debian, Suse, maaayybe Ubuntu) then I am not concerned with anything in git or some private repository.


Quick impressions:

Out of the box, I like Mupdf the most. It has no distracting, or ugly, GUI. It has a nice invert color function (which is almost a requirement for me since inverted colors are much less tiring to read). It is very fast.

However the other two are fast as well. Xpdf seems to be the fastest on my machines and with the files I tried. Also, I don't really like screen real estate wasted by gui elements, and when they are present, I want them to look and feel unobtrusive and a tad stylish, which is not the case for xpdf. It is quite fast though..

The install sizes are misleading I think. If you install any of these on your machine, your install size might be different because the dependencies apt-get pulls down may be slightly different for you, since, my installs of these pdf viewers was successive, meaning that each successive install had dependencies which were already installed on my machine. Judging by archive size though, Zathura wins the race by a longshot.

I will probably keep all three for the moment, but, with Zathura's extensive configurability (including multiple methods of inverting colors, substituting colors, and building in functions) I predict I will wind up with it, with a handful of inverted and muted color options. Seriously, you could add more text sizing and coloring options than my kindle has. All are good and quick though.
Title: Re: Lightweight pdf viewers
Post by: hakerdefo on February 23, 2014, 02:02:16 PM
epdfview is in Debian sid repo,
https://packages.debian.org/sid/epdfview (https://packages.debian.org/sid/epdfview)

Here are two more lightweight pdf viewers for you to try.
apvlv,
https://packages.debian.org/sid/apvlv (https://packages.debian.org/sid/apvlv)

qpdfview,
https://packages.debian.org/sid/qpdfview (https://packages.debian.org/sid/qpdfview)

Cheers!!!
Title: Re: Lightweight pdf viewers
Post by: VastOne on February 23, 2014, 08:33:16 PM
Debian Packages may show epdfview as available, but it is not in SID or Experimental repos at all
Title: Re: Lightweight pdf viewers
Post by: hakerdefo on February 23, 2014, 10:14:53 PM
OOPS! My mistake! Thanks for correcting it VastOne!
epdfview is available for i386, amd64 and many other architectures in Debian wheezy and squeeze repos. In Debian sid repo epdfview is only available for m68k port.
By the way this topic should be moved to 'General Support'.
Cheers!!!
Title: Re: Lightweight pdf viewers
Post by: superwow on February 24, 2014, 01:45:45 AM
Ok so I am back with a little more info, having taken up hakerdofo's challenge.

***   Qpdfview
Size archive: 1,025 kB
Size install: 4,048 kB
Dependencies: libc6, libcomerr2, libcups2, libgcc1, libgcrypt11, libgnutls26, libgssapi-krb5-2, libk5crypto3, libkrb5-3, libmagic1, libpoppler-qt4-4, libqt4-dbus, libqt4-sql, libqt4-svg, libqt4-xml, libqtcore4, libqtgui4, libstdc++6, zlib1g, libqt4-sql-sqlite
Gui control: yes, visible menu, visible gui control buttons
Right click: yes
Keybindings:
Control+I   invert colors
F11      full screen
Control+6   show two pages up (like an open book)
Control+Up/Down   zoom in/out (nonstandard implementation of zoom)
Strangely no keybinding for exit. Exit is accessible from Alt+f (File menu) > X.

Though I did not do this, apparently it is configurable via a configuration file.

This app is more what one automatically expects, graphically, from a run of the mill pdf viewer giving the user both a visible menu structure, a right click menu, and GUI controls at the top of the file. Gui elements are rendered by the Qt library. Qt is a crossplatform application development environment used for a while by Nokia for its former linux mobile phone platforms, Maemo/Meego (so sad to see it go). Since it has been open sourced, it has been picked up by many developers. It has come under recent some criticism by being very Google controlled though. You can search the webs for articles about this. Personally I do not think this is a bad thing at all as it allows for a common framework that developers can easily develop one app for Android, Linux, MSW, Mac (if the user installs the Qt framework), and potentially other platforms. I instaled Chrome yesterday, which I think uses Qt as well. But I know some people are big Google haters so, there, again, fwiw.

Also, unlike the other pdf viewers, qpdfview lets you select, highlight, and copy text to clipboard, according to various sites and as implied by the menu. I could not get this to work on my system. If anyone has recommendations about how to do this please let me know. In my opinion this is a defining feature, IF it works.

Another nice feature the others do not have is tabbed viewing. Zathura is supposed to have this feature (requiring some fiddling around with config file), though I have not tried it (or figured it out yet).

***   Apviv
I could not get apviv to install from Debian/Sid sources:

superwow@rlyeh:~$ sudo apt-get install apviv
[sudo] password for superwow:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package apviv

Since it isn't there, I won't consider it for my own home/work usage due to IT restrictions at work. When it installs via apt-get from regular repositories, I can take a look.

Speaking of additional pdf viewers, there are apparently command line options for viewing pdfs. I do love me some CLI :D but sadly never got them to display pdfs correctly on CLI, just jibberish. But others apparently can get it to work. Three methods...


less path/to/some.pdf


or


lesspipe path/to/some.pdf


or


lesspipe path/to/some.pdf | less


Like I said, I never got them to work.
Title: Re: Lightweight pdf viewers
Post by: hakerdefo on February 24, 2014, 06:00:32 AM
I thinky there is a typo. It's 'apvlv' not 'apviv'. So you can try again with,
sudo apt-get install apvlv

And regarding copying text in qpdfview press Ctrl+C, use the mouse to select an area and then click on copy text.
Cheers!!!