 |

09-27-2007, 10:43 AM
|
|
WebProWorld New Member
|
|
Join Date: Sep 2007
Posts: 1
|
|
How To I Use PDF Templates In PHP?
I have about twenty small pdf files business card design templates that I want to be able to populate with data from a MySQL database name, phone number, etc and output to the browser/save to the server. The format has to be PDF or another vector format suitable for direct to print use. I have been goggling looking for a simple way to do it and am coming up short. I can not just replace strings in the document because of the way for the format works. Has anyone ever done anything like this before or do I have to hard code the layout of each free templates into my application.
Thanks
|

09-28-2007, 06:12 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 578
|
|
Re: How To I Use PDF Templates In PHP?
To my knowledge you cannot update a PDF dynamically like that on the web... HOWEVER...
You can use flash to create and pull data from the database to create the PDF and you can also use HTML2PDF. The later I believe would require you to create the document in HTML (PHP) populate it with the data then use the HTML2PDF to create the final product.
I don't know how to do it but I think that Flash might be your best route there...
There is also a (new to me anyway) product from Adobe called LiveCycle designer which on a glance appears to create pdf's dynamically from a database not sure if it has online functionality...
Let us know here which solution you end up using and the pros and cons, I think it's definitely an awesome idea, and could be of great value to many of us here.
|

09-29-2007, 04:04 AM
|
|
WebProWorld Veteran
|
|
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 829
|
|
Re: How To I Use PDF Templates In PHP?
You can use FPDF to generate a PDF from scratch from within PHP, but I don't know of a way to populate an existing PDF.
|

09-29-2007, 03:49 PM
|
|
WebProWorld New Member
|
|
Join Date: Feb 2004
Location: UK
Posts: 6
|
|
Re: How To I Use PDF Templates In PHP?
Yes this is totally possible with FPDF we've used it many times to do what you looking for.
If your looking for some help or need a hand in coding then please let us know.
|

10-10-2007, 05:52 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 3,406
|
|
Re: How To I Use PDF Templates In PHP?
Generate PDFs with PHP
This is an excellent site - Class: classPdf (pdf) - PHP Classes
Also, if you generate xml code, you can display it in any format you want. This takes knowledgeof xslt and schema's, however, but your code can be served in any format including for smart phones, or direct input into a Db, nomatter which kind
__________________
What I am is what I am, are you what you are, or what.
Eddie Brickel
Last edited by mikmik : 10-10-2007 at 05:57 PM.
Reason: Added thoughts
|

10-12-2007, 05:55 AM
|
 |
WebProWorld Pro
|
|
Join Date: Dec 2003
Location: INDIA
Posts: 165
|
|
Re: How To I Use PDF Templates In PHP?
Yes, It is completely possible to generate PDF files on the fly in your server side scripts however the information is quite limited when it comes to updation of existing PDF documents. Have a look at the following article which has information and various tools to generate PDF files in PHP.
Generate PDF files in PHP - HTML to PDF Conversion
Sincerely,
Ajay Chadha (Director)
Chadha Software Technologies
|

10-12-2007, 05:57 AM
|
 |
WebProWorld Pro
|
|
Join Date: Dec 2003
Location: INDIA
Posts: 165
|
|
Re: How To I Use PDF Templates In PHP?
Since it is possible to convert HTML code to PDF using the information provided at the link below so I'd suggest you to keep the templates of your business cards in HTML format and when the data is updated then generate PDF of that HTML format.
Generate PDF files in PHP - HTML to PDF Conversion
Sincerely,
Ajay Chadha (Director)
Chadha Software Technologies
|

10-12-2007, 01:14 PM
|
|
WebProWorld New Member
|
|
Join Date: Oct 2007
Posts: 1
|
|
Re: How To I Use PDF Templates In PHP?
|

02-11-2008, 05:11 AM
|
|
WebProWorld New Member
|
|
Join Date: Feb 2008
Posts: 1
|
|
Re: How To I Use PDF Templates In PHP?
UK company Iceni has technology called InfixServer that will take PDF template documents then populate with either text, images or PDF files. Server based riven by an XML interface - so easy to generate from PHP.
See Untitled Document
Note - I sometimes work with Iceni which is why I have an Iceni e-mail address.
|

02-12-2008, 08:03 PM
|
|
WebProWorld Pro
|
|
Join Date: Aug 2005
Posts: 171
|
|
Re: How To I Use PDF Templates In PHP?
You use FPDF for solving your problem.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|