News:

LVCS.NET offers low cost domain registration services.

Main Menu

PDF generation

Started by grapesmoker, April 27, 2006, 03:58:05 PM

Previous topic - Next topic

grapesmoker

I'm interested in dynamically generating some PDF files from information stored in a database. The naive way to do it is to use exec(), which is obviously not allowed. Is there another way to accomplish this? Thanks in advance to anyone who can suggest a workaround.

Guide

There is a free PHP class through which PDF files can be generated on the fly through PHP :
www.fpdf.org
It isn't too hard to use, and the tutorials are quite clear.

Example of use : (from their first tutorial)


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

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