Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-09-2010, 03:22 PM   PM User | #1
john_w3
New Coder

 
Join Date: Jan 2010
Location: Cardiff, UK
Posts: 21
Thanks: 2
Thanked 0 Times in 0 Posts
john_w3 is an unknown quantity at this point
Creating PDF docs with PHP

Can anybody recommend a good free, reliable and robust PDF creation package?
The choices seem to be:
DOM PDF
FPDF
TCPDF and
HARU.
If anybody has any experience with any of these and can recommend or warn me against, it would be very helpful.
Thanks in advance.
john_w3 is offline   Reply With Quote
Old 08-09-2010, 03:37 PM   PM User | #2
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,460
Thanks: 89
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
I'm having a go at doing this myself. Going to try dompdf for now. I'll let you know if it works
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Old 08-09-2010, 05:15 PM   PM User | #3
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
FPDF works great for me! With a little effort in placing text/images on the page, it does pretty much everything I need it to.
tfburges is offline   Reply With Quote
Old 08-12-2010, 11:10 AM   PM User | #4
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,460
Thanks: 89
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
dompdf has worked fine for what i need it for. the file i created had some quite complicated table structures and it rendered the pdf file fine. The only thing i would say is it is quite resource hungry.

N.B Setting the page width to 800px in the html and creating an a3 page worked for fitting the content in the pdf window.
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Old 08-13-2010, 04:39 PM   PM User | #5
timgolding
Senior Coder

 
timgolding's Avatar
 
Join Date: Aug 2006
Location: Southampton
Posts: 1,460
Thanks: 89
Thanked 110 Times in 109 Posts
timgolding is on a distinguished road
Change of mind. I got fed up with dompdf. It wasnt rendering html tables properly. So i tried TCPDF. Seemed much better and with more functions.
It's alot bigger in size also.
__________________
You can not say you know how to do something, until you can teach it to someone else.
timgolding is offline   Reply With Quote
Old 08-13-2010, 05:00 PM   PM User | #6
disastro
Regular Coder

 
Join Date: Jul 2010
Posts: 185
Thanks: 3
Thanked 42 Times in 42 Posts
disastro is on a distinguished road
If if TCPDF doesn't suit the job and you haven't already found it, I can recommend Apache FOP.

Very fine grained control over the document. It's a formatting object processor. You can build your doc as XML or (X)HTML and apply XSL stylesheets to produce a PDF. You can even replicate most CSS styles.

I like it a lot but it does come at a price ... java. If you can live with the overhead, exec('fop') will do the trick.

Also, it's released under the Apache license.

Last edited by disastro; 08-13-2010 at 05:04 PM.. Reason: Additional info.
disastro is offline   Reply With Quote
Old 08-14-2010, 02:23 AM   PM User | #7
tfburges
Regular Coder

 
Join Date: May 2009
Posts: 425
Thanks: 3
Thanked 62 Times in 61 Posts
tfburges is an unknown quantity at this point
I recommended fpdf because it's relatively fast in generating PDFs. As for the layout, you just have to get a little clever but once you get the hang of it... piece of cake! I can guide you if needed.
__________________
I'm the founder of Loggur, a place to build and share web apps focused on maximizing efficiency and productivity:
http://www.loggur.com

My personal site and blog:
http://www.tfburgess.com
tfburges is offline   Reply With Quote
Reply

Bookmarks

Tags
fpdf, free, haru, pdf, tcpdf

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:14 AM.


Advertisement
Log in to turn off these ads.