Helping ordinary people create extraordinary websites!

Easy PDF Generation in PHP

By Akash Mehta
2008-03-01

Introduction

PDF is a popular, versatile format for storing content. PDF files can be generated once, and distributed in peace knowing that they will look the same across all platforms. They also serve as a perfect way of allowing your users to download or email a page from your website. In this tutorial, I'll show you how to generate PDF files in pure PHP and distribute your content in a single, consistent format.

Ever wanted to generate PDF files in your web application? You could let your users download pages in PDF format, generate PDF reports to be distributed in your organisation, or just get better control over how your pages look when printed. In this PHP PDF tutorial, we'll work through building a simple page and saving it as a PDF file.

We'll be using the FPDF library to generate our PDF files. The library is a simple PHP class that provides some very complex PDF generation functionality. Luckily, it offers some high level methods that you can use to quickly and easily generate PDF files without having to understand the internals of the PDF format.




Tutorial pages:

 3 Votes

You might also want to check these out:


Leave a Comment on "Easy PDF Generation in PHP"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS