Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend:
PDF Generation using only PHP, Part 1
Dec 23, 2003 @ 13:15:42

Frustrated with having to use an external application to create the PDF files that you need? Well, in case you didn't know, PHP can create those same PDF files all by itself with a bit more work - and Zend is here to show you how.

In their latest posting, PDF Generation using only PHP - part 1, they get you started on the road towards dynamic PDF generation with PHP. It's a good idea that you have some experience with PHP under your belt before starting this, but it's clear enough for a beginner to follow (just not very easily). They use a class structure to keep everything clean, and simple functions like addPage() or setFont() can make the setup of your PDF file a breeze. Of course, they give you the source to the class built up through the article to help you understand, piece by piece, what they're getting at.

They show you how to create this class that can: Create and output a PDF document, Set up page size and orientation, Insert simple text into the page, Handle simple font attributes, and Activate compression. Simple right? Well, we'll watch for Part Two to see what tricks they have in store...

tagged:

Link:


Trending Topics: