Creating a Simple PDF

To begin with, I'm going to create a blank PDF. This may seem like a waste of time, but it does, in fact, serve two purposes. First, it will allow me adequate space to give each function enough coverage. Second, it will give you an opportunity to test your PDF installation. Because of the slightly complicated nature of the format, most problems in generating or viewing a PDF are likely to happen during the simple act of creation, rather than during what might seem to be the more complicated steps. Once you've successfully run this script, you'll know where you stand for the more involved ones later in the chapter.

You will see numerous similarities between creating PDFs and creating images, which you did in the previous ...

Get PHP Advanced for the World Wide Web: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.