OM2 Posted June 6, 2014 Share Posted June 6, 2014 (edited) 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 June 6, 2014 by OM2 Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted June 6, 2014 Share Posted June 6, 2014 the best solution depends on what the system is being used for. Quote Link to comment Share on other sites More sharing options...
Barand Posted June 6, 2014 Share Posted June 6, 2014 CSV to Word Doc? Sounds like a simple MS Word mail merge. No PHP required. Quote Link to comment Share on other sites More sharing options...
peter_s Posted June 6, 2014 Share Posted June 6, 2014 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. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted June 6, 2014 Share Posted June 6, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.