Mirror of DjVu viewer djview git repo on sourceforge, with Debian packaging branches
GPL-2.0 License
This package contains the djview4 viewer and browser plugin. This new viewer relies on the DjVulibre library and the Qt toolkit.
Highlights:
Prerequisites:
WARNING: USING DJVIEW AS A PLUGIN IN 2020 IS VERY DIFFICULT BECAUSE POPULAR BROWSERS EITHER DO NOT SUPPORT NETSCAPE PLUGINS (CHROME), OR REMOVED SUPPORT FOR NETSCAPE PLUGINS OTHER THAN FLASH (FIREFOX). We regret this decision because djview/nsdejavu is a perfect example of very well behaved plugin that would have been easy to support.
Under Unix/X11, djview4 can be used as a browser plugin by means of the small shared library named nsdejavu.so. The djview3 distributed with djvulibre uses the same approach.
In fact both djview3 and djview4 communicate with nsdejavu.so with the same protocol. You can either install the file nsdejavu.so that comes with djview3 or the one that comes with djview4. The file nsdejavu.so uses the viewer specified with the environment variable NPX_DJVIEW or searches an executable viewer named djview, djview4 or djview3.
You need DjVuLibre (>= 3.5.18) See http://djvu.sourceforge.net for the source code and for pointers to binary packages. Under debian type "apt-get install libdjvulibre-dev"
You need Qt4 (>= 4.4.0) or QT5 (tested with 5.2) See http://trolltech.com for the source code. Select the version of Qt adapted to your platform. Under debian type "apt-get install libqt4-dev qt4-dev-tools
Under Unix the configure script uses pkg-config to locate the DjVuLibre library and its ancillary files. See http://pkgconfig.freedesktop.org. If you do not have pkg-config, you will have to specify which compilation options using the variabled DDJVUAPI_CFLAGS and DDJVUAPI_LIBS.
First run the script 'configure' (or 'autogen.sh' as explained above) to generate the makefiles.
Note that there will be no configure file if you obtain the djvulibre source using git clone. Instead there is a script 'autogen.sh' that uses automake to generate and call the actual configure script. Since all autogen.sh arguments will be passed to configure, you can simply treat autogen.sh as a replacement for configure.
Command 'configure --help' list options and environment variables that affect the generation of makefile. The most useful ones are:
--prefix= Indicate the base directory for installing djview. The default prefix is /usr/local. Binary packages are usually compiled with prefix /usr.
--mandir= Indicates where the man pages go. The default is ${prefix}/man but many systems prefer to install man pages in ${prefix}/share/man.
PKG_CONFIG_PATH= Indicates the path for search pkg-config description files. The default path is /usr/lib/pkgconfig:/usr/share/pkgconfig. If you have installed DjVuLibre with a prefix different from /usr, you probably want to add ${prefix}/lib/pkgconfig to this path.
DDJVUAPI_CFLAGS= Compiler flags for using the DjVuLibre api. This is useful when you do not have pkg-config or when pkg-config does not locate DjVuLibre.
DDJVUAPI_LIBS= Linker flags for using the DjVuLibre api. This is useful when you do not have pkg-config or when pkg-config does not locate DjVuLibre.
QMAKE= Indicate the location of the Qt4 qmake executable. This is useful when configure cannot locate Qt4.
Running configure creates all the required makefiles and executes command qmake in directory src.
You can then compile djview4 with command % make
Once the compilation is successful, install the binaries with % make install
In general you can compile the standalone viewer djview4 on non unix platforms. However the browser plugin capability is currently not working on non X11 systems.
We recommend the following procedure to compile on the Mac.
Install the Qt 5.x SDK.
Install Homebrew with the following packages $ brew install autoconf automake libtool pkg-config $ brew install jpeg libtiff git
Install the djvulibre Homebrew package $ brew install djvulibre
Advanced: If you want to compile a fresh version of djvulibre, you can use the instructions found in the djvulibre tarball. An interesting alternative is to install the current djvulibre development version using the Homebrew command, $ brew install --HEAD djvulibre but you might find that the brew recipe is out of date.
Get the djview source from the git repository $ git clone git://git.code.sf.net/p/djvu/djview-git djvulibre-djview $ cd djvulibre-djview Configure with command $ ./autogen.sh --enable-mac QMAKE= Then compile with command $ make
Prepare the djview.app bundle and the dmg file $ cd mac $ ./make_djview_bundle.sh $ ./make_djview_dmg.sh
In general you can compile the standalone viewer djview4 on non unix platforms. However the browser plugin capability is currently not working on non X11 systems. You will need to compile DjVuLibre. You will need the appropriate version of Qt.
There are also two ways to compile djview under Windows.
Using Visual C++
Using the MINGW compiler (not recommended)