Pages

Monday, October 25, 2010

FPDF

This article explains how you can create pdf documents in PHP. While I searched google for 'php + pdf', I found so many libraries that one can use. The one that looked simple to use was FPDF.

All you need to do is copy the php files that come along with the FPDF download and paste them in your php 'include' folder and refer to the package in your code.

This is a simple example.

<?php
require('fpdf.php');

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
?>

As shown in the example above, it is relatively simple to use the library. You can find the tutorials here.

You can create some complex pdfs such as the following,

A calender : Soruce Code Demo
A tree : Source Code Demo
Javascript support : Source Code Demo

You can find more such samples here. I hope you guys find it useful.

4 comments:

ninest123 said...

moncler, moncler, pandora jewelry, pandora jewelry, marc jacobs, ugg,ugg australia,ugg italia, sac louis vuitton pas cher, canada goose, moncler outlet, pandora charms, canada goose outlet, bottes ugg, moncler, canada goose uk, replica watches, hollister, louis vuitton, louis vuitton, swarovski, moncler, swarovski crystal, links of london, ugg boots uk, moncler, louis vuitton, doudoune canada goose, ugg pas cher, coach outlet, louis vuitton, moncler, canada goose, canada goose outlet, canada goose, thomas sabo, canada goose, pandora charms, ugg,uggs,uggs canada, wedding dresses, moncler

ninest123 said...

timberland boots, soccer shoes, nike roshe, asics running shoes, oakley, juicy couture outlet, beats by dre, new balance, jimmy choo shoes, vans, north face outlet, instyler, mcm handbags, abercrombie and fitch, baseball bats, hollister, karen millen, gucci, lancel, bottega veneta, valentino shoes, louboutin, reebok shoes, north face outlet, converse outlet, hollister, herve leger, juicy couture outlet, ralph lauren, ferragamo shoes, insanity workout, ghd, nike air max, mont blanc, chi flat iron, nfl jerseys, toms shoes, supra shoes, mac cosmetics, converse, babyliss, wedding dresses, celine handbags, ray ban, vans shoes, nike air max, montre pas cher, soccer jerseys, p90x workout, birkin bag

ninest123 said...

vans pas cher, michael kors outlet, mulberry, michael kors, sac guess, new balance pas cher, ugg boots, nike air max, true religion outlet, hogan, true religion jeans, burberry, hollister, hollister, oakley pas cher, true religion jeans, coach purses, michael kors outlet, timberland, ray ban uk, converse pas cher, north face, burberry outlet online, longchamp, michael kors, nike huarache, michael kors outlet, tn pas cher, ray ban pas cher, michael kors outlet, michael kors outlet, hermes, air force, lululemon, nike blazer, lacoste pas cher, michael kors, nike trainers, ralph lauren uk, nike air max, nike roshe, nike air max, michael kors, north face, vanessa bruno, ugg boots, true religion jeans, hollister pas cher, nike free run uk, abercrombie and fitch

ninest123 said...

louboutin pas cher, nike air max, ray ban sunglasses, prada handbags, michael kors, coach outlet, coach outlet, nike free, replica watches, kate spade outlet, uggs on sale, louboutin shoes, longchamp outlet, longchamp, burberry, polo ralph lauren outlet, tory burch outlet, nike air max, louboutin, ralph lauren pas cher, louis vuitton, christian louboutin outlet, chanel handbags, prada outlet, tiffany jewelry, ray ban sunglasses, kate spade handbags, sac longchamp, nike outlet, air max, gucci outlet, air jordan pas cher, louboutin outlet, nike roshe run, replica watches, nike free, longchamp pas cher, jordan shoes, polo ralph lauren outlet, tiffany and co, cheap oakley sunglasses, ray ban sunglasses, oakley sunglasses, ugg boots, replica handbags, longchamp outlet, ugg boots