JagPDF
Prev Up Home Next

Installation from source is currently supported on x86/Linux, amd64/Linux and x86/Windows platforms. More recent versions of GCC and MSVC are supported.

You can either download the latest stable release or retrieve the development branch. The development branch is mirrored on GitHub. To clone the repository, do

git clone git://github.com/jgresula/jagpdf.git
  • CMake, a cross-platform, open-source build system.
  • FreeType, a free, high-quality, and portable font engine.
  • Boost, free peer-reviewed portable C++ source libraries.
  • ICU, a collaborative open source software development project, delivering Unicode support on a wide variety of platforms.
  • zlib, a lossless data-compression library.
  • libpng, the official PNG reference library.

Optional

  • Python
  • SWIG, a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. Required for JagPDF for Python or Java.
  • GCC-XML, an XML output extension to GCC. Required only if you intend to change the public API.
  • Java JDK

JagPDF uses the CMake build system. A typical sequence of commands installing JagPDF looks like this:

Linux
$ tar -xjf jagpdf-1.4.0.src.tar.bz2
$ mkdir jagpdf-1.4.0-build
$ cd jagpdf-1.4.0-build
$ cmake [options] ../jagpdf-1.4.0
$ make 
$ make install
Windows
> unzip jagpdf-1.4.0.src.zip
> mkdir jagpdf-1.4.0-build
> cd jagpdf-1.4.0-build
> /path/to/visual-studio/VC/bin/vcvars32.bat
> cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [options] ../jagpdf-1.4.0
> nmake
> nmake install

The installation can be customized by passing options to cmake. The following sections describe variables defined by JagPDF as well as the most common standard CMake variables. Refer to CMake Documentation for complete description of CMake features.

Use the following syntax to specify a variable on the cmake command line:

-DVARIABLE=VALUE

For instance the following command generates makefiles which build a debug version of JagPDF, and disable support for Python and Java.

$ cmake -DBUILD_PYTHON=OFF -DBUILD_JAVA=OFF -DCMAKE_BUILD_TYPE=Debug .
Languages

The following variables enable or disable JagPDF libraries for individual languages. The library is not built if development libraries and files for a particular language is not found.

Variable

Description

Default Value

BUILD_C

build JagPDF for C/C++

ON

BUILD_PYTHON

build JagPDF for Python

ON

BUILD_JAVA

build JagPDF for Java

ON

Installation

The following variables control the JagPDF installation location.

Variable

Description

Default Value

CMAKE_INSTALL_PREFIX

installation prefix, prepended onto INCLUDE_INSTALL_DIR and LIB_INSTALL_DIR variables

/usr/local on Linux, %ProgramFiles%\ JagPDF on Windows.

INCLUDE_INSTALL_DIR

where to install JagPDF C/C++ include files

include

LIB_INSTALL_DIR

where to install JagPDF C/C++ and Java libraries

lib

JagPDF for Python is installed using distutils during the make install step.

Configuration

The following variables specify paths to development libraries and files for supported languages. Use these variables if they are installed in non-standard locations.

Variable

Description

Default Value

JAVA_HOME

path to Java JDK

detected during configuration

PYTHON_HOME

path to Python

detected during configuration

Miscellaneous

Variable

Description

Default Value

CMAKE_CXX_COMPILER

C++ compiler

detected during configuration

CMAKE_C_COMPILER

C compiler

detected during configuration

CMAKE_BUILD_TYPE

build type

Release for Unix Makefiles and Debug for NMake Makefiles.

JagPDF comes with two test suites: unit tests and regression tests. Unit tests are part of the source tarball and are focused on JagPDF internals.

To run unit tests, do

$ make unit-tests

Regression tests are available as a separate download. They test the public API. This includes comparing generated PDF files with the known good ones.

To run regression tests, do

$ make apitests
  • The supported way of installing JagPDF is to run cmake from the command line using Unix Makefiles or NMake Makefiles generators. Other generators or interactive CMake utilities (ccmake, cmake-gui.exe, cmake -i) might work but were not tested.
Prev Up Home Next