[nycphp-talk] Working with PDF

Allen Shaw ashaw at
Fri Jun 9 14:35:01 EDT 2006

Don't know if it fits what you're trying to do (or if it's an 
unnecessary Rube Goldberg solution), but here's what my system does:

We needed a system to take files edited in MS-Word (invitation letters, 
actually), pop in the various name and address fields for a recipient, 
and export the whole thing to a PDF file.  Support for some 
MS-Word-friendly format was crucial, as the invitation letters would 
change at least with every event, and often go through several versions 
for each event.

Our solution was to save the files in RTF, with placeholder tags typed 
right into the text; then use PHP to replace the tags with the right 
values and use Ted ( (a linux only RTF reader) 
to convert the files from RTF to PDF.  This way, the non-technical 
people who write the letters can spin away on their edits, and I can 
upload them as templates with little trouble.  (Trial and error showed 
me a few things to clean up each time from their sloppy MS-Word 
formmatting before uploading, though.)

It's not pure PHP like FPDF, but it gets us the features we needed.

- Allen

Aaron Fischer wrote:
> Greetings!
> I'm beginning a project that will involve creating PDF documents.  So 
> far my research has turned up PDFlib 
> ( and FPDF (
> So far it seems that FPDF will do what I need.  It has the added benefit 
> of being free (as opposed to PDFlib which would run at least $450).
> Have folks used FPDF?  Would you recommend it? 
> Are there are any other means to generate PDF that you would recommend?
> If helpful, here's a brief project summary:
> I am developing an application that will allow nontraditional students 
> to apply for admission to our college.  The user will be able to create 
> an account and work on her application, saving and returning at any time 
> (data will be stored in MySQL).  The PDF aspect comes into play when the 
> applicant would like to preview the application with her data populating 
> the fields.  It will also be used for our support staff to print the 
> applications once they are completed.
> Here's the blank application which would need to be created and 
> populated with student data (application is pages 2-4, instructions are 
> on page 1):
> Cheers,
> -Aaron
> _______________________________________________
> New York PHP Community Talk Mailing List
> New York PHP Conference and Expo 2006
> Show Your Participation in New York PHP

Allen Shaw
Polymer (

More information about the talk mailing list