Integrate PDF with your CMS with TCPDF

By

Depending on what kind of website you run, you may need to create PDF documents, such as invoices, reports, forms, and tickets, on the fly. One of the simplest ways of enabling that functionality is by employing TCPDF, a pure PHP class for generating PDF documents. TCPDF doesn’t require external libraries for the basic functions and includes support for UTF-8 Unicode, right-to-left languages, XHTML, JavaScript, forms, encryption, digital signatures, 1-D and 2-D barcodes, several image formats, and much more.

As a software library for developers, TCPDF is easy to use and to integrate with existing applications or web services. In fact it is already integrated with many popular PHP-based content management systems and web-based applications, including Joomla, Drupal, Moodle, phpMyAdmin, TCExam, Xoops, Elxis CMS, ImpressCMS, JELIX Frameweork PHP5, SugarCRM, Symfony, TYPO3, Vtiger CRM, Yii Framework, CMS Made Simple, and many others.

TCPDF began life in 2001 when Italian software engineer Nicola Asuni was looking for a free and open source library to integrate with a PHP-based CMS project he was working on. After trying several projects that didn’t quite fit the bill he started his own. The TCPDF class was derived from the public domain FPDF class by Olivier Plathey, but has since been almost entirely rewritten, with hundreds of new features and thousands of lines of code added.

Looking ahead, Asuni notes that TCPDF doesn’t yet implement all features of the PDF 1.7 standard (PDF 32000-1:2008). In upcoming versions, “I will implement new and stronger encryption algorithms and extended support for annotations,” he says.

Asuni welcomes ideas, comments, and suggestions from users. “I also need help to complete parts of the source code. Anyone who would like to help should refer to the forums and trackers on TCPDF’s SourceForge project page. I always try my best to get back to everybody.”