Satya’s Weblog

Spartan attitude !

Archive for the ‘php’ Category

all posts pertaining to php like trouble shooting, libraries n others…

tcpdf — Dynamic pdf builder

Posted by satya on July 8, 2008

Working on my current project, which as my boss says ‘confidential’…, i came across a requirement where i’ve 2 generate PDF files on the fly. Say, the user enters his details, and in return, a pdf file should se sent back…which one can save, print or whatever.

ZEND, as i believe already has a PHP library. but its quite primitive in stage. Then did i find this open source library TCPDF. This works in PHP. The latest version of TCPDF is 5.0 . It has a wide spectrum of functionality like :

  • no external libraries are required for the basic functions;
  • supports all ISO page formats;
  • supports UTF-8 Unicode and Right-To-Left languages;
  • supports document encryption;
  • includes methods to publish some HTML code;
  • includes graphic and transformation methods;
  • includes bookmarks;
  • includes Javascript and forms support;
  • includes a method to print various barcode formats;
  • supports TrueTypeUnicode, TrueType, Type1 and encoding;
  • supports custom page formats, margins and units of measure;
  • includes methods for page header and footer management;
  • supports automatic page break;
  • supports automatic page numbering and page groups;
  • supports automatic line break and text justification;
  • supports JPEG and PNG images whitout GD library and all images supported by GD: GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM;
  • supports stroke and clipping mode for text;
  • supports Grayscale, RGB and CMYK colors and transparency;
  • supports links;
  • supports page compression (requires zlib extension);
  • supports user rights management so Adobe Reader users can save filled-in copies of forms they complete.

Definitely, this is a cool library for those who love to do hard-core stuff with PHP.  For, further study …

TCPDF home website

Here, go for the DOCS tab, for installation, examples and other stuff.

TCPDF Dcoumentation

Here, u’ll have a clear description of each of the variable and method this library.

Posted in php | Tagged: , , , , , , | Leave a Comment »