9

I am using Ubuntu 16.04 and it does not have the latest version of poppler.

This is blocking me from opening important documents that are password protected. I need the latest version to do my day-to-day stuff. Please explain in easy terms as I'm a Linux newbie.

Can someone either tell me how to upgrade manually or get this included as an update?

1
  • poppler-0.43 is still considered a development version .... and who knows when anybody will use "0.44" ? The Ubuntu / Debian development versions have come as far as version 0.41 ! (See Ubuntu yakkety) - Jun 3, 2016 at 23:40

5 Answers 5

12

To be able to open password-protected pdfs with Evince on my own system I found (after much testing) that I had to compile the latest release of Poppler from source and also compile the latest release of Evince, building it against the newer Poppler.

How to upgrade Poppler & Evince to fix problems opening password-protected PDF files

First install all these prerequisites for compiling:

sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev

(more dependencies may be found on other systems but I'm working from a 2-week old installation, so hopefully this will be enough for most)

Poppler

Open a terminal so you are in your home directory. If you are really keen on tidiness, you can make a new directory for the two source directories you are going to end up with, for example mkdir poppler and enter it: cd poppler.

First download the encoding files (no need to compile these) to the current working directory

wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz

Extract (it does untar cleanly):

tar -xf poppler-data-0.4.7.tar.gz

Enter the directory

cd poppler-data-0.4.7

And magically send the files to the right locations in /usr/share with:

sudo make install

Now go back up one level

cd ..

Download & extract the main package:

wget https://poppler.freedesktop.org/poppler-0.44.0.tar.xz
tar -xf poppler-0.44.0.tar.xz
cd poppler-0.44.0

Now run the configure file like this:

./configure --enable-poppler-glib

Here you will get errors if I missed anything from my list of dependencies above. The errors might be illuminating eg 'thing-you-need not found' in which case you can try sudo apt install thing-you-need and try again. If that doesn't work, try searching online for the error message.

If it exits without errors you can run:

make

Which will take a while. When it's done, you can use sudo make install but even better, you can use checkinstall to make this installation known to dpkg (yay!) so:

sudo apt install checkinstall
sudo checkinstall

If you ever want to uninstall this, you can conveniently do so with sudo dpkg -r poppler as checkinstall will politely inform you. If you use sudo make install you can still uninstall at any time by entering the source directory (so keep it!) and typing sudo make uninstall

Evince

We've already got the dependencies for Evince, so assuming you are still in the poppler directory go back up to home with cd or to wherever you want to download Evince.

wget http://ftp.gnome.org/pub/GNOME/sources/evince/3.20/evince-3.20.0.tar.xz
tar -xf evince-3.20.0.tar.xz
cd evince-3.20.0
./configure
make
sudo checkinstall
2
  • use " ./configure --enable-poppler-glib --prefix=/usr". so that you won't need to set up some environment variables later
    – Alok Nayak
    Aug 18, 2017 at 10:34
  • 1
    I tried installer poppler 0.62 on Ubuntu 14.04 getting this error - bash: ./configure: No such file or directory Jan 26, 2018 at 17:11
1

You've actually fallen in famous X-Y problem loop.

You don't need latest Evince to open password protected pdf. You can just install Foxit reader and make it default PDF viewer. It will gracefully open those pdf.

Download the Foxit reader from here https://www.foxitsoftware.com/downloads/ and install it by double clicking. If that doesn't seem to work, it might be missing executable permission. give it using chmod +x foxitreader.run like command

Anyway, here are some interesting readings on X-Y problem

2
  • Thanks I can open my encrypted pdfs now, problem is I need another package to actually decrypt the file. I can't do this with foxit.
    – Phil
    Aug 30, 2016 at 19:28
  • The types of pdfs you said are normally can be opened with adobe readers latest edition. mupdf also can open it. foxit also. but evince cannot.
    – Anwar
    Aug 30, 2016 at 19:32
1
sudo apt-get install python-poppler
2
  • 1
    Thank you, I've done this but I still can't open the pdf with evince. I type in the right pass and it asks me again. (it's definitely the right password)
    – Phil
    Jun 3, 2016 at 21:45
  • Thanks!! I have a problem with Evince placing annotations in the wrong positions, but after this install the problem seems to be fixed. Jul 14, 2018 at 17:24
0

First, do sudo apt-get update.

To update all of your packages you can do sudo apt-get upgrade, or to just update poppler do sudo apt-get install python-poppler.

1
  • Thanks Bob, I've done this too but still same result (refer to my comment to Greg)
    – Phil
    Jun 3, 2016 at 21:50
0

I found building the latest version of poppler/pdftoppm on Ubuntu 20.04 to be incredibly difficult and time-consuming. Now that I've ironed out all the details I've written it down in Stack Overflow here, however, in great detail:

How to install/upgrade to the latest version of Poppler/pdftoppm on Linux Ubuntu.

I had to use aptitude to install a ton of the dependencies since apt failed to work for many of them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .