Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

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 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:
» Introduction
» Why would you want to generate PDFs?
» Options for PDF Generation
» Hello World with FPDF
» Examining the code
» Further reading on FPDF


Related Tutorials:
» Zend Framework Tutorial
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» PHP Site Search Made Easy
» Installing and Configuring Drupal 6.1

Ask A Question
characters left.