Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Tree [4026e0] debian debian/4.10-3 /
History



File Date Author Commit
config 2015-02-12 Barak A. Pearlmutter Barak A. Pearlmutter [e0d687] update git ignores
debian 2015-02-15 Barak A. Pearlmutter Barak A. Pearlmutter [4026e0] log changes
desktopfiles 2015-02-15 Barak A. Pearlmutter Barak A. Pearlmutter [805a89] switch "cat x | foo" to "foo <x", and gzip -n f...
npdjvu 2015-01-22 Leon Bottou Leon Bottou [3f9bb7] add src/djview.am and npdjvu/npdjvu.am into git...
nsdejavu 2015-02-12 Barak A. Pearlmutter Barak A. Pearlmutter [e0d687] update git ignores
src 2015-02-12 Barak A. Pearlmutter Barak A. Pearlmutter [e0d687] update git ignores
.gitignore 2015-02-12 Barak A. Pearlmutter Barak A. Pearlmutter [e0d687] update git ignores
AUTHORS 2015-01-20 Leon Bottou Leon Bottou [f1990c] fix README files and EXTRA_DIST
COPYING 2007-01-06 leonb leonb [acac45] *** empty log message ***
COPYRIGHT 2007-06-10 leonb leonb [d9d669] starting to add pdf output support.
ChangeLog 2015-01-20 Leon Bottou Leon Bottou [f1990c] fix README files and EXTRA_DIST
Makefile.am 2015-01-22 Leon Bottou Leon Bottou [61e950] list qmsources.awk in EXTRA_DIST
NEWS 2015-02-01 Leon Bottou Leon Bottou [f4a64e] version 4.10-pre (missing translations)
README 2015-01-22 Leon Bottou Leon Bottou [b27401] Folded compilation info into README file
README_translations 2014-06-01 Leon Bottou Leon Bottou [03ccff] added spanish translation
autogen.sh 2015-01-22 Leon Bottou Leon Bottou [a77b96] Makefile.am no longer duplicates file lists fou...
configure.ac 2015-02-10 Leon Bottou Leon Bottou [0f17b0] configure: added options summary. streamlined v...
djview4.spec 2015-02-01 Leon Bottou Leon Bottou [f4a64e] version 4.10-pre (missing translations)

Read Me

1- DJVIEW4
==========

1.1 - DJVIEW4
-------------

This package contains the djview4 viewer and browser plugin.
This new viewer relies on the DjVulibre library and the Qt toolkit.

Highlights:
- entirely based on the public djvulibre api.
- entirely written in portable Qt4/Qt5.
- works natively under Unix/X11, MS Windows, and MacOS X.
- continuous scrolling of pages
- side-by-side display of pages
- ability to specify a url to the djview command
- all plugin and cgi options available from the command line
- all silly annotations implemented
- display thumbnails as a grid
- display outlines
- page names supported (see djvused command set-page-title) 
- metadata dialog (see djvused command set-meta)
- implemented as reusable Qt widgets

Prerequisites:
- DjVuLibre >= 3.5.18
- Qt >= 4.4



1.2 - USING DJVIEW4 AS A PLUGIN
-------------------------------

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.



2- INSTALLATION FROM SOURCES
============================


2.1 PREREQUISITES
-----------------

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.


2.2 COMPILING AND INSTALLING UNDER UNIX
---------------------------------------


First run the script 'configure' to generate the makefiles.

Command 'configure --help' list options and environment 
variables that affect the generation of makefile.
The most useful ones are:

--prefix=<directory>
        Indicate the base directory for installing djview.
        The default prefix is /usr/local.
        Binary packages are usually compiled with prefix /usr.

--mandir=<directory>
        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=<colon-separated-directories>
        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>
        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>
        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=<filaname>
        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



2.3 COMPILATION HINTS FOR MAC OS X
----------------------------------

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 two options under Mac OS X.

* Installing the X11 system and its development files.
  First install the X11 version of Qt4.
  Proceding as for normal Unix systems.
  Please refer to section 2 for details.      

* Installing the native Mac OS X version of Qt4.
  First install the native Mac version of Qt4 or Qt5.

  We recommend that you first install macports or homebrew and make 
  sure that libraries zlib, libpng, jpeg, and tiff are available. 
  You must also install (or compile) Qt and djvulibre.

  Here are examples of configure commands that have worked:

    $ ./configure --disable-nsdejavu --disable-desktopfiles \
        PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
        QMAKE=/Developer/Tools/Qt/qmake \
        QMAKESPEC=macx-g++

    $ ./configure --disable-nsdejavu --disable-desktopfiles \
        PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
        QMAKE=/Users/sombody/Qt/5.3/clang_64/bin/qmake \
        DDJVUAPI_LIBS="/usr/local/lib/libdjvulibre.a /usr/local/lib/libjpeg.a" \
        DDJVUAPI_CFLAGS=-I/usr/local/include \
        --with-tiff=no 

  Then compile with
  
    $ make

  This procedure generates a nice application bundle.
  However the binaries inside the bundle may depend on 
  shared libraries located elsewhere. To produce a distributable
  application bundle, you must copy the libraries inside the bundle
  and use command install_name_tool to make sure that the executable
  finds the included copy of the libraries. This is explained in post 
  <http://sourceforge.net/p/djvu/discussion/103286/thread/d50b1c32/#614e/e4f9>.
  See also the Qt documentation about the deployment of Mac applications.


2.4 COMPILATION HINTS FOR WINDOWS
-----------------------------------

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++ 

  - First you need to compile Qt4 using Visual C++.
    This used to be require patching the Qt source
    <http://qtnode.net/wiki?title=Qt4_with_Visual_Studio>
    Starting with Qt-4.3.2, the opensource Qt version
    supports Visual C++ right out of the box.
  - Compile djvulibre using the visual C++ method.
  - Go to directory src
  - Type command 
       $ qmake -win32 -tp vc
    to generate a MS Visual C++ project file.
  - Tweak the project file to properly link with
    the djvulibre library and the tiff library.
    One good way to do so is to open the file "djvulibre.sln"
    that comes with the cvs version of djvulibre. Then add the
    project "djview.vcproj" and insert the property sheets
    "dirs", "warnings", "libtiff" and "tools" found in the 
    djvulibre-3.5/win32/djvulibre directory. You also need
    to add the references to libdjvulibre and libtiff.
    This works well despite requiring a lot of clicks.

* Using the MINGW compiler (not recommended)

  - Install the binary version of Qt4.
  - Install the mingw version of zlib, libtiff, libjpeg.
  - Compile djvulibre using the configure method.
  - Go to directory djview4/src.
  - Type command 
       $ qmake DEFINES+=HAVE_TIFF \
          LIBS+="-L$HOME/djvulibre-3.5/libdjvu/.libs -ldjvulibre -ltiff" \
	  QMAKE_CXXFLAGS+="-I$HOME/djvulibre-3.5"
    where you replace the paths by the actual djvulibre paths.
  - Then compile using 
       $ mingw32-make SHELL=cmd.exe