bills
|
| Posted: 01/28/2009, 6:12 AM |
|
any pointers / sample would be greatfully apprecaited
|
|
|
 |
aondecker
Posts: 58
|
| Posted: 01/28/2009, 6:41 AM |
|
http://www.fpdf.org
Not sure what all you want to do.. but that site is what i use to create pdf's from php.
Free and easy. Tutorials are provided on site.
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 01/28/2009, 10:20 AM |
|
Hi
There is also an alternative to fpdf called dompdf. don't have a URL but a google search will find it.
Have fun.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
Markie
Posts: 251
|
| Posted: 01/28/2009, 1:37 PM |
|
unfortunately, dompdf has a big fat warning on it's site telling us about a security vulnerability
http://www.digitaljunkies.ca/dompdf/
I'm also looking for a good method to make pdf's with php, but it's kind of hard. For example I can't seem to add images from the database to pdf. Text fields are no problem and I'm willing to help you if you want to know how I did this.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
Gena
Posts: 591
|
| Posted: 01/28/2009, 1:44 PM |
|
you can insert like this
$img = "../Images/logo_pdf.jpg";
$pdf->addJpegFromFile($img, $X, $Y,$W); // addJpegFromFile(imgFileName,x,y,w,[h])
_________________
Gena |
 |
 |
Gena
Posts: 591
|
| Posted: 01/28/2009, 1:49 PM |
|
I found great pdf tools for PHP
http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf
I have tested it locally and it seems very good.
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
TCPDF has been originally derived from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org).
_________________
Gena |
 |
 |
datadoit
|
| Posted: 01/28/2009, 2:21 PM |
|
FPDF along with FPDI
(http://www.setasign.de/products/pdf-php-solutions/fpdi/).
Allows you to import pre-existing PDF documents, then overlay them with
your dynamic data.
|
|
|
 |
Markie
Posts: 251
|
| Posted: 01/29/2009, 12:53 AM |
|
Tcpdf and fpdf seems to be the only ones with a recent update, the other ones that I have seen (dompdf, html2pdf etc.) are several years old. What's worse: html2pdf seems to work only with php4 (while php5 is on my server)
I will take a look at tcpdf and fpdf today. They are free as in beer
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
Markie
Posts: 251
|
| Posted: 01/29/2009, 2:14 AM |
|
wow, tcpdf even works with Xampp 1.7 under Windows XP. This is great for testing purposes on localhost. Thanks for the advice Gena !
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL |
 |
 |
TonyReid
Posts: 159
|
| Posted: 01/30/2009, 12:59 AM |
|
I use this for PDF reporting in CCS : http://www.ros.co.nz/pdf/ it doesn't need any outside modules.
Its super stable and does the companies finance/risk reports on the Intranet.
I've also seen it being used in lots of gpl apps.
TCPDF looks interesting though - I hadn't come across that before, great find :)
_________________
-----------
PHP/indy Game Developer - http://www.AbsoluteBreeze.co.uk |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 02/04/2009, 8:20 AM |
|
Hi.
There is alot of good info here. I will look at some of these other alternatives.
Here is a sort of related post that talks about using DOMPDF.
http://forums.yessoftware.com/posts.php?post_id=103645
Just wanted to add this to the mix.
Here is a post from a while ago that shows how to use DOMPDF including code examples. (lol ...this post is exactly 1 year old today.)
http://forums.yessoftware.com/posts.php?post_id=93514
To resolve the security issue of DOMPDF, all that is needed is to modify DOMPDF slightly to only function in cgi mode, preventing any access from external sources and only able to be called from your ccs application.
BTW. These posts do not have the cli removal code shown. If you need help adding the security fix to DOMPDF as related to CCS, let me know.
One main advantage of doing it this way, for me anyway, is that the exact CCS page generated can be turned into a PDF, making PDF creation as easy as creating the layout in CCS alone.
I will look at some of the other alternative discussed here though. There is always more than one way to skin a cat.
Incidentally, here is some CCS Code that is pre-configured and will do just what yoy want.
http://ccselite.com/online_store.php?pid=24
Have fun.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
|