
The PDFlib Cookbook is a collection of PDFlib coding fragments for solving specific problems. It is maintained as a growing list of sample programs. The Cookbook topics are written in the Java language, but can easily be ported to other programming languages since the PDFlib API is almost identical for all supported language bindings. For some topics, code in other languages like PHP or C is provided. Each Cookbook topic denotes the PDFlib product required for its execution.
Please note the following when using the PDFlib Cookbook topics with PDFlib Lite:
Each Cookbook topic denotes the PDFlib product required for its execution in the comment on top of the source code. An error message will appear when compiling a Cookbook topic containing functions which are not supported by PDFlib Lite, such as Textflow, tables, or layers functions, for example.
Unicode encoding is not supported by PDFlib Lite. If a topic calls the PDFlib function load_font() with Unicode encoding change "unicode" to "winansi" to make the topic work with PDFlib Lite.
Each topic can be viewed individually in the browser together with its source code, description and output PDF. For a complete list of all topics currently being available, see Browse all Topics.
For the most recently published and newest topics see the change log.
The PDFlib Cookbook package contains the Java files and all required input data, as well as an Ant build file and an Eclipse project. The Cookbook topcis can conveniently be compiled and run with the Java build tool Apache Ant. Form more information, see ant.apache.org. Alternatively, you can manually compile and run the samples.
As a prerequisite for compiling and executing the PDFlib Cookbook topics the PDFlib binary library for Java must have been installed. You can download the appropriate PDFlib 8 evaluation package here.
Download the PDFlib Cookbook archive released on April 20, 2009. Unpack the archive and open the "doc/readme.txt" file for further information on installing and working with the PDFlib Cookbook.
For the most recent changes, see the change log.
PDFlib-cookbook-2012-01.tar.gz (14,8 MB)
PDFlib-cookbook-2012-01.zip (15,1 MB)