download
KDE 4 environment
If you want to try Okular, you need to have an already set up KDE 4 environment.
Please note that most of the GNU/Linux distributions already provide packages of the latest stable version of KDE and Okular, you might want to check those before compiling Okular yourself.
Also, distributions should provide development packages usable for compiling KDE 4 applications.
In case you want to compile the development version of KDE and Okular, please refer to
http://techbase.kde.org/Getting_Started/Build/KDE4.
You can find general information about compiling KDE at
http://techbase.kde.org/Getting_Started.
Optional packages
There are some optional package you could install in order to have some more functionalities in Okular.
Some are already packaged for your distro, but other maybe not. So, if possible, use the packages your distro ships.
Poppler (PDF backend)
To compile the PDF backend, you need the Poppler library (http://poppler.freedesktop.org).
The minimum version required is:
- Okular 0.6/KDE 4.0: >= 0.5.4
- Okular 0.7/KDE 4.1, Okular 0.8/KDE 4.2: >= 0.6
- Okular >= 0.9/KDE >= 4.3: >= 0.8
We suggest the current Git version, that you can download and install by doing the following:
git clone git://git.freedesktop.org/git/poppler/poppler cd poppler ./autogen.sh ./configure --prefix=/where/install/poppler/ make make installRemember to adjust the environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH to make poppler reachable:
export PKG_CONFIG_PATH=/where/install/poppler/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=/where/install/poppler/lib:$LD_LIBRARY_PATH
Libspectre (PostScript backend for Okular >= 0.7/KDE >= 4.1)
In order to compile and use the PostScipt (PS) backend, you need libspectre >= 0.2.
If your distro does not package libspectre, or the packaged version is not enough, you can download it from http://libspectre.freedesktope.org.
DjVuLibre (DjVu backend)
To compile the DjVu backend, you need DjVuLibre >= 3.5.17.
If your distro does not package DjVuLibre, or the packaged version is not enough, you can download it from http://djvulibre.djvuzone.org.
libTIFF (TIFF/fax backend)
libTIFF is needed to compile the TIFF/fax backend. Currently there is no minimum required version, so any quite recent version of the library available from your distro should work. In case of troubles with that, do not hesitate to contact the Okular developers.
libCHM (CHM backend)
libCHM is needed to compile the CHM backend. Currently there is no minimum required version, so any quite recent version of the library available from your distro should work. In case of troubles with that, do not hesitate to contact the Okular developers.
Libepub (EPub backend for Okular >= 0.7/KDE >= 4.1)
In order to compile and use the EPub backend, you need the epub library.
If your distro does not package libepub, or the packaged version is not enough, you can download it from http://sourceforge.net/projects/ebook-tools.
Okular
Once you have setup the proper KDE 4 environment - and installed some of the suggested external libraries - you can download and compile Okular this way:
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegraphics -N cd kdegraphics svn up cmake svn up libs svn up okular mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/kde4/install/dir .. cd okular make make install
If you install Okular in a different path than your system kde4 install directory it is possible that you need to run
export KDEDIRS=/path/to/where/you/installed/okular:$(kde4-config --prefix); kbuildsycoca4
so that the correct Okular instance and libraries are picked up
Old optional packages
Libgs (PostScript backend for Okular 0.6/KDE 4.0)
In order to compile and use the PostScipt (PS) backend, you need libgs installed, that is the Ghostscript library for rendering PS documents. Its minimum required version is 8.56 (but a version >= 8.62 is strongly suggested).
If your distro does not provide it already packaged, you have to compile it yourself. Download it from the Ghostscript website (http://pages.cs.wisc.edu/~ghost/), unpack it and then:
./configure --prefix=/where/install/gs/ // to configure
make install // this step will compile and install
// the normal ghostscript and its binaries and data files
make install-so // this will compile and install the ghostscript library
// needed for Okular
Remember to adjust the environment variable LD_LIBRARY_PATH with the path of libgs
export LD_LIBRARY_PATH=/where/install/gs/lib:$LD_LIBRARY_PATH
[ Edit ]
Okular - more than a reader