News

Welcome to End Point’s blog

Ongoing observations by End Point people

Building Xpdf on Ubuntu

It may happen that you need to use Xpdf, even though it no longer ships with Ubuntu and is considered ... outdated? buggy? insecure? In any case, it still renders some PDFs that Poppler-based viewers such as Evince don't, or allows some troublesome PDFs to print as fonts and line art instead of a rasterized mess.

Here's how I built and installed xpdf 3.02 on Ubuntu 11.04 (Natty Narwhal) x86_64:

sudo apt-get install libfreetype6-dev libmotif-dev
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz  # now 3.03 is current
tar xzpf xpdf-3.02.tar.gz
cd xpdf-3.02
./configure --with-freetype2-library=/usr/lib/x86_64-linux-gnu \
    --with-freetype2-includes=/usr/include/freetype2 \
    --with-Xm-library=/usr/lib \
    --with-Xm-includes=/usr/include/Xm
make
# see lots of warnings!
sudo make install

That's it. Not as nice as the old native Debian/Ubuntu packages, but gets the job done.

2 comments:

Anonymous said...

Thanks!! Xpdf may not look that modern, but it's still the PDF reader that I want to use. Now I have it running on ubuntu again.

Bliss Madmen said...

Nice, thank you very much. i just installed it in ubuntu precise and the latest daily build of ubuntu 13.04 and it works. xpdf does not crash. but i did though change the path: "./configure --with-freetype2-library=/usr/lib/x86_64-linux-gnu \" to "./configure --with-freetype2-library=/usr/lib/ \". Anyway thanks for informing the community.