Oncaphillis::poppler-agg

poppler-agg

INTRO

poppler-agg is meant to provide an AGG (http://antigrain.com) rendering back-end to the poppler (http://poppler.freedesktop.org) library.

MOTIVATION

AGG the Anti-Grain Geometry Library represents a somewhat obscure software project. Although one might say that it is currently unmaintained it still provides a hi-quality graphics engine well comparable with projects like cairo. AGG makes heavy use of C++ templates which constitutes a major advantage as well as a potential drawback.

On the one hand, all aspects of the underling color space and color storage model can be manipulated via template arguments, making it possibly to provide a large set of output formats for specialized hardware like printers with very specific needs for custom color spaces and bit-depth per channel. Furthermore there are no hardware dependent parts in the AGG library. It simply operates on abstracted two dimensional arrays of pixels.

On the other hand the heavy use of templated classes might make it complicated to create speed optimized hardware specific code. One may not expect performance wonders when using an AGG back-end.

STATUS

The AGG backend currently supports three color spaces "rgba", "cmyka" and "device_na<N>". All major vector graphics operations are supported.

DOWNLOAD

The git repository is available under (https://github.com/oncaphillis/poppler-agg.git). It contains two branches. (a) "master" which is a clone of the official poppler repo (git://git.freedesktop.org/git/poppler/poppler) and (b) "agg_support" which I use to add everything for (you guessed it) AGG support.

In addition you need the modified AGG source available under https://github.com/oncaphillis/agg.git.

INSTALL

First you will have to install the modified version of AGG. This variant supports the agg::cmyka color space and the agg::pixfmt_cmyk storage model.

After this you will have to switch into the "agg_support" branch of the poppler-agg checkout and configure the package with the --with-agg argument. The headers and libs of the agg installation should be made available via the CXXFLAGS and LDFLAGS environment variables like:

LDFLAGS="-L/path/to/agg/libs/" CXXFLAGS="-I/path/to/agg/headers" ./configure --with-agg

Install the poppler library as usual. In addition to the the standard poppler utils you will find the "pdftoagg" program.

invoking

pdftoagg [-cmyk|-rgb] [file.pdf]

Will create "file.tif" from "file.pdf" representing the first page of the pdf document (at least the vector graphics part). The internal color model will be cmyk or rgb depending on the given flag. Under standard configuration the resulting "file.tif" will always be RGB. CMYK colors will be transformed befor saving. If compilated with the the macro SPLASH_CMYK=1 the program will output a CMYK tif file.

© 2008-14; Dr. Sebastian Kloska ( Oncaphillis )
Powered by: [?]