How to Create pdf file in php

1. Before creating a pdf file in php, first you have to download fpdf from fpdf.org
2. Its a php class that allows to create pdf file without using the pdf library
3. Below are the simple example for creating the pdf file :-

<?php
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',20);
$pdf->Cell(100,30,'iWeb Tech Expert');
function Footer() {
$this->Image("logo.jpg", (8.5/2)-1.5, 9.8, 3, 1, "JPG", "http://www.iwebtechexpert.com");
} $pdf->Output();
?>

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Pinterest