3

How can I make a PDF file in PHP. What I want to make is a student list. So I want to query the database, get the information and give it to the user as a PDF when he clicks generate student list.

5 Answers 5

12

You have two good options first is the standard php library for manipulating pdf's: https://www.php.net/pdf

Or you can use http://www.fpdf.org/. I would recommend the second.

Other options include: www.pdflib.com

1
  • Another recommendation for fpdf. Had performed well for us, even under heavy loads.
    – Mainegreen
    Commented Feb 13, 2009 at 19:09
1

PEAR has the PEAR::File_PDF package.

1

There are are already many libraries available with PHP bindings. One that comes to mind is PDFLib (www.pdflib.com). If I am not mistaken there should even be a lite version that you can use for free. But just check it out.

Hope it helps

1

I use the ezPDF class. Lightweight, simple, easy to use, and handles most cases.

0

FPDF is a classical in the field. It seems it has limitations when handling Unicode (eg. Asian char sets), so there are libraries extending it (UFPDF, TCPDF...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.