title: Designing Format Of FPDF
body: <p>I want to create below the image format in fpdf. i try to write code in fpdf for that image which is shown below but when pdf comes design is not same as image below .So But How can i design the below the image format in fpdf.</p>
  
  <p><a href="https://i.stack.imgur.com/c0cG6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c0cG6.jpg" alt="enter image description here"></a></p>
  
  <pre><code>&lt;?php
  include("database/db.php");
  $branch_name=$_POST['branch_name'];
  $name=$_POST['name'];
  $course=$_POST['course'];
  $month=$_POST['from']. " - " .$_POST['to'];
  $payment_date=$_POST['payment_date'];
  extract($_POST);
  $sql="Update studentfees set `paid`='{$paid}',`due`='{$due}',`month`='$month',`payment_date`='$payment_date' where roll='{$_REQUEST['roll']}'";
  $result=mysql_query($sql);
  date_default_timezone_set("Asia/Kolkata");
  $date=date("d-m-Y");
  require("fpdf/fpdf.php");
  $pdf=new FPDF();
  $pdf-&gt;AddPage();
  $pdf-&gt;SetFont("Arial","",14);
  $pdf-&gt;Cell(170,10,"Sigma Training Institute ",0,1,'C');
  $pdf-&gt;Cell(70,10,"",0,1);
  $pdf-&gt;Cell(100,10,"Candidate Copy",1,0,"C");
  $pdf-&gt;Cell(70,10,"",0,1);
  $pdf-&gt;Cell(70,10,"",0,1);
  $pdf-&gt;Cell(20,10,"Date",1,0);
  $pdf-&gt;Cell(40,10,"$date",1,0,"C");
  $pdf-&gt;Cell(20,10,"",0,0);
  $pdf-&gt;Cell(30,10,"Receipt No",1,0,'R');
  $pdf-&gt;Cell(30,10,"$date",1,1,"R");
  $sql1="Select * from studentfees where roll='{$_REQUEST['roll']}'";
  $result1=mysql_query($sql1);
  if($dtset=mysql_fetch_array($result1))
  {
  $pdf-&gt;Cell(70,10,"Candidate Name :-",0,0);
  $pdf-&gt;MultiCell(110,10,$dtset['name'],0,1);
  $pdf-&gt;Cell(70,10,"Candidate Course :-",0,0);
  $pdf-&gt;MultiCell(110,10,$dtset['course'],0,1);
  $pdf-&gt;Cell(70,10,"Total Course Fees ",0,0);
  $pdf-&gt;MultiCell(70,10,$dtset['total_fee'],0,1);
  $pdf-&gt;Cell(70,10,"Amout Paid:- ",0,0);
  $pdf-&gt;MultiCell(70,10,$dtset['paid'],0,1);
  $pdf-&gt;Cell(70,10,"Candidate Roll Number:- ",0,0);
  $pdf-&gt;MultiCell(70,10,$dtset['roll'],0,1);
  $pdf-&gt;Cell(70,10,"Due Amout:- ",0,0);
  $pdf-&gt;MultiCell(70,10,$dtset['due'],0,1);
  $pdf-&gt;Cell(70,10,"Payment Date:- ",0,0);
  $pdf-&gt;MultiCell(70,10,$dtset['payment_date'],0,1);
  $pdf-&gt;Cell(70,10,"",0,1);
  $pdf-&gt;Cell(70,10,"_________________________________________________________________",0,1);
  $pdf-&gt;Cell(70,10,"",0,1);
  $pdf-&gt;output();
  }
  ?&gt;
  </code></pre>