PDF Generation via PHP

Difference between TCPDF and FPDF

4
3920

TCPDF:

TCPDF is now one of the world’s most active Open Source projects, used daily by millions of users and included in thousands of CMS and Web applications, tcpdf.org

Main Features:

  • 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 (http: www.imagemagick.org/www/formats.html)
  • 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.

FPDF

FPDF or Free PDF is a PHP class which allows to generate PDF files with pure PHP, you may use it for any kind of usage and modify it to suit your needs. www.fpdf.org

Main Features:

  • Choice of measure unit, page format and margins
  • Page header and footer management
  • Automatic page break
  • Automatic line break and text justification
  • Image support (JPEG, PNG and GIF)
  • Colors
  • Links
  • TrueType, Type1 and encoding support
  • Page compression

4 COMMENTS