Welcome to WebmasterWorld Guest from 18.207.238.169

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Using PHP to create on the fly PDF files

...and also replaces variables--like a person's name

     
10:26 pm on Oct 2, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 4, 2004
posts:456
votes: 0


I'd like to find a PHP program that creates PDFs on the fly. Also, I'd like the capability of replacing variables within the document. The idea is to personalize the PDF as much as possible. (Ideally when it is personalized they will be less inclined to share.)

I've located programs ranging from free to $150 and one for mega bucks.

At this point I need recommendations and guidance on the best practice for this type of thing. If it makes any difference currently when the text file is outputted to PDF it weighs in at around 600KB. If possible I'd like to include graphics, but it is not a deal breaker. Finally, my preference is to include a TT font set within the PDF.

Any suggestions and/or advice is greatly appreciated.

[edited by: Storyman at 10:27 pm (utc) on Oct. 2, 2006]

11:15 pm on Oct 2, 2006 (gmt 0)

Senior Member

joined:Nov 12, 2005
posts:5967
votes: 0


A good placed to start: PDF Functions [php.net].

Another good place to look is phpclasses.org [google.com]

Best of luck!

6:47 am on Oct 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 22, 2002
posts:1751
votes: 0


There are a few packages out there that allow you to format your document in HTML and have that converted to PDF. Needless to say that formatting a document in HTML is not that hard ;)

HTML_ToPDF is one, htmldoc is another. The downside is that these packages need to be installed on the server. Root access is required, which is unlikely in a shared hosting environment.

7:03 am on Oct 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


FPDF Library [fpdf.org] is also worth a look.

dc

12:30 pm on Oct 3, 2006 (gmt 0)

Senior Member from FR 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4452
votes: 11


Source Forge has a good system; sorry: no links I can find.
4:10 pm on Oct 3, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


I second FPDF. I've used it many times, and included both TT fonts, images, etc. So far, there hasn't been a single instance where I have not been able to create the PDF I wanted.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members