Rectangle 27 0

php Outputting text fields into PDF file using FPDF?


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

$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 10, $_POST['first_name']);
$pdf->Output();
?>
<form action="printpdf.php" method="post" id="print">
    <input type="text" size="25" name="first_name" />
    <input type="submit" />
</form>

If you're doing a lot with PDFs, you may consider using DOMPDF.

Note that this is taken almost directly from the FPDF tutorial.

Thanks for your help.It solved the problem.I'm pretty much learning the way FPDF works from scratch.Once again thanks.

Note