Tuesday, 7 January 2014

FPDF in PHP

FPDF is created from php file
Download fpdf latest version(v1.7 in zip file format)  http://www.fpdf.org/
Extract and paste it in your project folder and name it as "fpdf1.php"
Create the php file as mentioned beolw. Run this php file will get PHP file.
class creation PDF from fpdf is required. --- It's working.....

<?php
/*
codes to save the user input values to db(this works fine)
*/
require('fpdf/fpdf.php');
class PDF extends FPDF
{
//some functions
}
$pdf=new PDF();

$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World to kaspon pdf!');
$pdf->Output();

?>

Thanks for ref links:

FPDF:
===
http://stackoverflow.com/questions/15417506/trying-to-write-to-a-pdf-file-using-fpdf-and-fpdi
http://stackoverflow.com/questions/18732212/php-to-pdf-using-fpdf-failing-to-open-my-pdf-filebroken
http://nick.boldison.com/websites/php/fpdf-creating-pdf-files-using-php/
http://www.phpclasses.org/package/421-PHP-Free-PDF-generation-class-without-PDFlib.html

No comments:

Post a Comment

Data scientist in 2025 - guide YT

  Reference from YouTube Channel:  Sahil & Sarra ► Everything in one place: Datacamp Associate Data Scientist with Python Career Track: ...