What PDFlib is and what it does
PDFlib has been on the market since 1997; its manufacturer, PDFlib GmbH in Munich, was a founding member of the PDF Association in 2006. The core is written in C and C++ and can be called from C, C++, Java, .NET, Objective-C, Perl, PHP, Python, RPG and Ruby, on Windows, macOS, Linux and Unix as well as IBM System i and IBM Z. It produces PDF 1.4 to 1.7 and PDF 2.0 — with Unicode, TrueType and OpenType fonts, text flow with hyphenation, tables across several pages, SVG and the common image formats. The current version is PDFlib 11.
The library comes in tiers. PDFlib creates PDFs from scratch. PDFlib+PDI also imports existing PDF pages and includes pCOS, which queries metadata, fonts or embedded files. The PDFlib Personalization Server (PPS) adds blocks that are set up in an Acrobat template and filled by the program. TET 6 works in the opposite direction and extracts text, images and metadata. In terms of standards, PDFlib covers PDF/A-1, -2 and -3, PDF/X-3, PDF/X-4, PDF/X-4p and PDF/X-5n, PDF/UA-1, PDF/VT-1 as well as ZUGFeRD, the German hybrid e-invoice format, and Factur-X.
How we work with PDFlib
With us, PDFlib almost always runs in PHP, loaded as an extension — in applications of our own based on Symfony or Laminas, in TYPO3 extensions and in Shopware plugins. Generation gets a module of its own: data in, PDF out. Where the layout changes more often than the logic, we work with PPS templates so that a design change does not mean a code change. Large runs go to the background and are logged, so that every document can be traced back to its record.
For us, a standard only counts as met once an independent validation tool confirms it; accessible PDFs are also tested with a screen reader. The applications run on our own servers in Germany, where PHP version, PDFlib extension, fonts and output profiles are maintained together — with maintenance under an SLA and with updates to new PDFlib versions that we first run against the same test data. The source code is yours, and the PDFlib licence is registered to your company.
Limits: when PDFlib is too much
PDFlib is licensed commercially, per machine and operating system, and it is a library, not a design tool: every layout is programmed or built as a template. For a manageable number of simple documents with no standard to meet, that is more than the task requires. In that case we use an open-source HTML-to-PDF solution — in the same PHP application, with the same tests and without PDFlib licence costs. If the requirements grow later, only the generation changes.
The second limit concerns expectations. PDFlib produces a document to PDF/UA-1, but the structure — headings, reading order, alternative text — has to come from the application. The same goes for ZUGFeRD: the library embeds the XML in a PDF/A-3 as the standard requires, while correct invoice data is your system’s job. Knowing this before the project means planning the data side from the start instead of delivering it at the end.