c1174268
asked on
Best PDF Library to use with PHP
Hi,
We have developed a custom built web based system using PHP for a client who provides HIP Packs. The system currently manages everything from on-line orders, payments, invoicing, Account Customers, Statement of accounts etc.
The next step is to automatically create certain documents based on th einformation provided. These documents ideally need to be as PDF. Each Document will have a number of design variations depending on which client its for i.e resellers.
We can do all this in PHP and output to HTML pages No Problem. However, I am not sure which PDF Library to use. The system has about 10 users and they work on it for approx 8-10 hours per day. Each user processes various different aspects of the order. They are inputting about 50-60 orders per day.
So i need a PDF Library that:
Ideally is cheap or open source.
Is not Too slow
Needs to output correctly - The design/ layout of each PDF has to be perfect
ideally something that is easy to implement on a shared hosting server (Using 1 and 1)
I don't mind if it can be done via a cron, so that it runs at midnight for example to not affect the speed of the system.
Also, i don't mind if we out put to HTML first then it converts to PDF, but we need to ensure layout, page breaks etc work correct.
Appreciate your help
Thanks
We have developed a custom built web based system using PHP for a client who provides HIP Packs. The system currently manages everything from on-line orders, payments, invoicing, Account Customers, Statement of accounts etc.
The next step is to automatically create certain documents based on th einformation provided. These documents ideally need to be as PDF. Each Document will have a number of design variations depending on which client its for i.e resellers.
We can do all this in PHP and output to HTML pages No Problem. However, I am not sure which PDF Library to use. The system has about 10 users and they work on it for approx 8-10 hours per day. Each user processes various different aspects of the order. They are inputting about 50-60 orders per day.
So i need a PDF Library that:
Ideally is cheap or open source.
Is not Too slow
Needs to output correctly - The design/ layout of each PDF has to be perfect
ideally something that is easy to implement on a shared hosting server (Using 1 and 1)
I don't mind if it can be done via a cron, so that it runs at midnight for example to not affect the speed of the system.
Also, i don't mind if we out put to HTML first then it converts to PDF, but we need to ensure layout, page breaks etc work correct.
Appreciate your help
Thanks
Hi,
Go ahead with tcpdf:
http://sourceforge.net/projects/tcpdf/
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples
Regards.
Go ahead with tcpdf:
http://sourceforge.net/projects/tcpdf/
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples
Regards.
Hi,
Tcpdf is multi-language supported.
You can create pdf files easily with tcpdf class.
Tcpdf is multi-language supported.
You can create pdf files easily with tcpdf class.
ASKER
Hi Guys,
Thanks for your thoughts so far?
what are the pro's and cons of using each. i want know how people have found using them, not just a feature list. what are your personal favourites and why
Thanks for your thoughts so far?
what are the pro's and cons of using each. i want know how people have found using them, not just a feature list. what are your personal favourites and why
Hi,
Due to multilanguage support I am using TCPDF class.
Due to multilanguage support I am using TCPDF class.
ASKER
just so everyone is aware, i do not need multi language support.
Why I am using them because those are flexible and easy to use.
ASKER
So far it seems the choices for me are down to FPDF or TCPDF. Is there any major difference between the two and which one is easier to use and outputs faster?
FPDF is easy and I tried, it looks good
ASKER
Also any thoughts on DOMPDF compared to the other two?
ASKER
From my limited research, although TCPDF is newer and has more features, it seems the PDF files are much larger in size compared to FPDF. Does anyone have experience of using both programs?
FPDF is the gold standard. You can position to within 1/100 inch (good enough for detailed resolution on things as small as business cards). It supports the addition of fonts, images and drawing objects. It is all OOP code and easy to extend. The online documentation is very concise and accurate.
I do not recommend creating a document in HTML and then trying to go to PDF. Instead create a data set, perhaps as an object or array. Use an abstraction layer to send the data set to any of the various output formats. This helps keep the business logic separated from the presentation logic.
Best of luck, ~Ray
I do not recommend creating a document in HTML and then trying to go to PDF. Instead create a data set, perhaps as an object or array. Use an abstraction layer to send the data set to any of the various output formats. This helps keep the business logic separated from the presentation logic.
Best of luck, ~Ray
ASKER
Hi Ray
Thanks for Posting? Have you used TCPDF? my only worry with FPDF is that it has'nt been updated in a while, should I be concerned about this? Also does FPDF require PHP5?
Thanks for Posting? Have you used TCPDF? my only worry with FPDF is that it has'nt been updated in a while, should I be concerned about this? Also does FPDF require PHP5?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
www.adobe.com/devnet/pdf/l
www.sourcecodeonline.com/l