Jump to content

PHP + using a PDF template with place holders


OM2

Recommended Posts

I want to create many PDF pages by using a PDF document template that uses place holders

 

The data would come from a CSV file

 

I've looked into a solution for the above for a couple of years now! :)

I haven't found anything that would do the trick for me

 

It seems as though PDF and PHP don't go well - especially if I want to use a template with place holders

 

Just looking for suggestions

Thanks

 

EDIT: forget PDF... is it possible to use something else? Like a Word doc??

 

 

OM

Edited by OM2
Link to comment
Share on other sites

The best ways to generate PDF files with PHP is a combination of a template language like Smarty or Twig in combination with a pdf service like pdfcrowd. The excel file can just be read and exploded by newlines. If you need more complex support use the phpexcel lib from phpexcel.codeplex.com.

Link to comment
Share on other sites

Are you going to write an appl to handle this thing? When you say templates do you mean multiple (as in many) unique layouts for a final product into which you wish to plug varying and different numbers of values into?

 

With a little practice and experimentation you could use a php script and FPDF to create your tmeplates and have the script read in your csv file and post the values into the template very easily.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.