Skip to content
gal kahana edited this page Feb 11, 2023 · 21 revisions

Welcome to the PDF Writer library Wiki. It includes all information about using the PDF Writer library.

The PDF Writer library allows you to generate PDF files. It was developed with a principal “one-off” method of generating PDF files. Adhering to this idea it is both fast and retains a low memory signature regardless of how large the file grows. It is therefore ideal for generating small PDF files fitting for exchange scenarios, as well as for generating large file, as is the case for most VDP (Variable Data Publishing) scenarios.

The library has a set of high level features for adding content to a PDF. The high level features supported by the library are:

  1. Creation of pages.
  2. Primitives drawing and any of the simple PDF operators for drawing content.
  3. PDF,JPG, PNG and TIFF images embedding.
  4. Unicode text support with Type1, TrueType and OpenType fonts.
  5. Defining reusable objects using XObject Forms.
  6. Modifying PDF files.
  7. You can also, independently, use the library as a PDF Parser.

To support the requirement for using more sophisticated features the library was made to be very extensible.
It is easy to implement more PDF features by using the lower level set of methods that provide access to the PDF building blocks themselves. Adding a feature requires you to be familiar with the PDF formatting of that feature, but will not require you to write the basic PDF building blocks, as the library handles this.

It is also very extensible for the existing features. For instance, if you want to support more than just Unicode text, it is possible to develop just the mapping between the text to the glyphs, and the library will take care of the rest – namely defining the font, drawing the glyphs etc. Another example – if you want to add more attributes to a page than what is supported – the library provides hooks to adding them at the time the page is written to the file.

For a full list of features and from there to details of each feature go to – Features

and did i mention it’s free?


Now for Some technical details:

  • The project is licensed under Apache 2.0. for more information go to Licensing
  • The programming language is C++
  • It is cross platform
  • The library is thread safe, in that you can use multiple instances of it to generate multiple files.

You can grab the project downloadables from the releases section of this repo.


Now for some pointers to the rest of the documentation, with help and samples:

The project has a blog, with some useful how-tos. You can find a list of them here: http://pdfhummus.com/How-To

Go to PDFWriter Project, for discussion of classes, and sort of reference for the high level objects.

Something of note is that the library is using a namespace called PDFHummus for some of its classes, for details on classes defined under this namespace, go here – PDFHummus namespace

Linearized PDF is not supported, check this note – Note on Linearized PDF

In the beginning i wrote a project vision statement. it’s here Project principles
There are several codes or other libraries i’m using for the library, they are all mentioned here – Open Source Source Code and Libraries Usage

Clone this wiki locally