TCPDF – PHP class for generating PDF documents

TCPDF is a PHP library for generating PDF documents on-the-fly.

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts.

TCPDF is free and open source software.

Features include:

  • No external libraries are required for the basic functions.
  • All standard page formats, custom page formats, custom margins and units of measure.
  • UTF-8 Unicode and Right-To-Left languages.
  • TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts.
  • Font subsetting.
  • Methods to publish some XHTML + CSS code, Javascript and Forms.
  • Images, graphic (geometric figures) and transformation methods.
  • Supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick.
  • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index – Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix ECC200, QR-Code, PDF417.
  • ICC Color Profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies.
  • Automatic page header and footer management.
  • Document encryption up to 256 bit and digital signature certifications.
  • Transactions to UNDO commands.
  • PDF annotations, including links, text and file attachments.
  • Text rendering modes (fill, stroke and clipping).
  • Multiple columns mode.
  • No-write page regions.
  • Bookmarks and table of content.
  • Text hyphenation.
  • Text stretching and spacing (tracking/kerning).
  • Automatic page break, line break and text alignments including justification.
  • Automatic page numbering and page groups.
  • Move and delete pages.
  • Page compression (requires php-zlib extension).
  • XOBject templates.
  • PDF/A-1b (ISO 19005-1:2005) support.

Website: tcpdf.org
Support: Documentation, GitHub Code Repository – a new version of this library is under development at this GitHub Code Repository
Developer: Nicola Asuni – Tecnick.com Ltd
License: GNU Lesser General Public License; either version 3 of the License, or (at your option) any later version.

TCPDF is written in PHP. Learn PHP with our recommended free books and free tutorials.

Return to PDF Development Libraries Home Page

Read our complete collection of recommended free and open source software. The collection covers all categories of software.

The software collection forms part of our series of informative articles for Linux enthusiasts. There's tons of in-depth reviews, alternatives to Google, fun things to try, hardware, free programming books and tutorials, and much more.
Share this article