📘 Lesson  ·  Lesson 45

Generate PDF (FPDF)

Generate PDF (FPDF)

About

To create PDF files (invoices, reports, certificates) in PHP, the easiest free library is FPDF.

Simple PDF

require("fpdf.php");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial", "B", 16);
$pdf->Cell(40, 10, "Hello, this is a PDF!");
$pdf->Output();   // shows the PDF in browser

Common Uses

  • Student mark sheets and certificates.
  • Invoices and bills.
  • Reports from database data.

Summary

  • FPDF creates PDFs: AddPage(), SetFont(), Cell(), Output().
  • Great for invoices, certificates and reports.

परिचय

PHP में PDF files (invoices, reports, certificates) बनाने को सबसे आसान free library FPDF है।

Simple PDF

require("fpdf.php");
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial", "B", 16);
$pdf->Cell(40, 10, "Hello, this is a PDF!");
$pdf->Output();   // browser में PDF दिखाता है

Common Uses

  • Student mark sheets और certificates।
  • Invoices और bills।
  • Database data से reports।

सारांश

  • FPDF PDFs बनाता है: AddPage(), SetFont(), Cell(), Output()।
  • Invoices, certificates और reports के लिए बढ़िया।
← Back to PHP Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।