Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

Understanding the Zend Framework, Part 5: Creating PDF files

Building the perfect reader

Nicholas Chase (, Developer/Writer, Studio B
Nicholas Chase, a Studio B author, has been involved in Web site development for companies such as Lucent Technologies, Sun Microsystems, Oracle, and the Tampa Bay Buccaneers. Nick has been a high school physics teacher, a low-level radioactive waste facility manager, an online science fiction magazine editor, a multimedia engineer, and an Oracle instructor. More recently, he was the Chief Technology Officer of an interactive communications firm in Clearwater, Florida, USA, and is the author of several books on Web development, including XML Primer Plus (Sams). He's currently trying to buy a farm so he and his wife can raise alpacas and chickens. He loves to hear from readers and can be reached at:

Summary:  In previous parts of this "Understanding the Zend Framework" series, you created the basic application, the Chomp online feed reader, using the open source PHP Zend Framework. In this tutorial, you use the Zend Framework's PDF capabilities to generate a PDF document based on entries the user has saved.

View more content in this series

Date:  18 Jan 2011 (Published 01 Aug 2006)
Level:  Intermediate PDF:  A4 and Letter (999 KB | 35 pages)Get Adobe® Reader®



The Chomp online feed reader is now beginning to take shape. Users can register for accounts and subscribe to feeds, as well as read them. Now, users can export saved entries as PDF documents. To make this happen, you used the Zend Framework's Zend_PDF component to create a new PDF, add shapes, graphics, and text, and save it. You also looked at outputting the PDF directly to the browser and at using an existing PDF, rather than creating a new one.

In addition, you looked at ways to get around some of the problems with manually building PDFs, such as an inability to line-wrap automatically and an inability to add new pages to the document automatically.

In Part 6, learn how to send a user an e-mail when a favorite feed is updated.

6 of 9 | Previous | Next


Zone=Open source
TutorialTitle=Understanding the Zend Framework, Part 5: Creating PDF files