Vanilla.PDF  2.0.0
Cross-platform toolkit for creating and modifying PDF documents
Build

Project dependencies

CMake This project uses CMake (https://cmake.org/) framework as a cross-platform build tool.
Latest version is available at https://cmake.org/download/.

OpenSSL Building OpenSSL from source is out of scope of this guide.
For detailed information about build process visit OpenSSL official page.
You can find pre-built binaries here.

zlib Building zlib from source is out of scope of this guide.
For detailed information about build process visit zlib official page.
You can find pre-built binaries here.

libjpeg Building libjpeg from source is out of scope of this guide.
For detailed information about build process visit libjpeg official page.
You can find pre-built binaries here.

Compiling from source on Windows

Alternatively, you can compile library the UNIX way using Cygwin or MinGW.

Download source tarball and put it somewhere (e.g. use c:\tools)

Now start a visual studio native command shell (for either x86 or x64) and type

cd c:\tools
tar zxvf vanillapdf-x.y.z.src.tar.gz

to unpack the sources (you can obtain tar from e.g. http://gnuwin32.sourceforge.net/packages.html). Alternatively you can use an unpack program, like 7-Zip (see http://www.7-zip.org) or use the build in unpack feature of modern Windows systems).

Now your environment is setup to generate the required project files for vanillapdf.

cd into the vanillapdf-x.y.z directory, create and cd to a build directory

mkdir build
cd build
cmake -G "Visual Studio 12 2013" ..

Compiling from source on UNIX

  1. Installing dependencies

    sudo apt-get install cmake
    sudo apt-get install libjpeg-dev
    sudo apt-get install libssl-dev
    sudo apt-get install zlib1g-dev

  2. Unpack the archive, unless you already have done that:

    unzip vanillapdf-master.zip # uncompress the archive

  3. Create a build directory:

    cd vanillapdf-master
    mkdir build
    cd build

  4. Run CMake with the makefile generator:

    cmake -G "Unix Makefiles" ..

  5. Compile the program by running make:

    make

  6. Verify the library sanity:

    make test

    With the expected output:

    100% tests passed, 0 tests failed out of 241
    Total Test time (real) = 113.72 sec