WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-27-2007, 10:43 AM
WebProWorld New Member
 

Join Date: Sep 2007
Posts: 1
robinhood RepRank 0
Default 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
Reply With Quote
  #2 (permalink)  
Old 09-28-2007, 06:12 PM
Orion's Avatar
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 578
Orion RepRank 2
Default 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.
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #3 (permalink)  
Old 09-29-2007, 04:04 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 829
speed RepRank 1
Default 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.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory : Web Directory Script
Reply With Quote
  #4 (permalink)  
Old 09-29-2007, 03:49 PM
WebProWorld New Member
 

Join Date: Feb 2004
Location: UK
Posts: 6
FlashJester Support Team RepRank 0
Default 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.
Reply With Quote
  #5 (permalink)  
Old 10-10-2007, 05:52 PM
mikmik's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 3,406
mikmik RepRank 1
Default 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
Reply With Quote
  #6 (permalink)  
Old 10-12-2007, 05:55 AM
chadhaajay's Avatar
WebProWorld Pro
 

Join Date: Dec 2003
Location: INDIA
Posts: 165
chadhaajay RepRank 1
Smile 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
Reply With Quote
  #7 (permalink)  
Old 10-12-2007, 05:57 AM
chadhaajay's Avatar
WebProWorld Pro
 

Join Date: Dec 2003
Location: INDIA
Posts: 165
chadhaajay RepRank 1
Default 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
Reply With Quote
  #8 (permalink)  
Old 10-12-2007, 01:14 PM
WebProWorld New Member
 

Join Date: Oct 2007
Posts: 1
nmisch RepRank 0
Default Re: How To I Use PDF Templates In PHP?

Try FPDI, Setasign :: FPDI - Import existing PDF documents into FPDF - A free and open source PHP class
Reply With Quote
  #9 (permalink)  
Old 02-11-2008, 05:11 AM
WebProWorld New Member
 

Join Date: Feb 2008
Posts: 1
richard@iceni.com RepRank 0
Default 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.
Reply With Quote
  #10 (permalink)  
Old 02-12-2008, 08:03 PM
WebProWorld Pro
 

Join Date: Aug 2005
Posts: 171
sarpras RepRank 1
Default Re: How To I Use PDF Templates In PHP?

You use FPDF for solving your problem.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
web graphic and web templates navjeet Graphics & Design Discussion Forum 1 08-26-2007 07:28 PM
Blogger Templates arpecop Submit Your Site For Review 1 01-16-2005 07:38 PM
www.web-templates.se hernlind Domain Discussion Forum 0 12-09-2004 02:28 PM
Web templates, good or bad? webmidwife Graphics & Design Discussion Forum 10 10-27-2004 04:57 PM
web site templates - ? mark93 Graphics & Design Discussion Forum 4 08-18-2004 06:57 PM


Search Engine Optimization by vBSEO 3.2.0