3

I have lots of data rows in excel, each row has columns such as first name, last name, gender...etc.

I also have an image as the template, I would like to define some placeholders on it. And then for each data row, an image will be generated by filling its data items into these placeholders.

Finally, all these images will be combined as a single pdf (one image per page).

Is there any software application that can do such thing?

Note: while placing the image as the background/watermark in ms word and then using mail merge may work, one big limitation is that, it's difficult to achieve absolute positioning with merge fields. This is why I am looking for other possible solutions.

bobo
  • 1,809
  • 4
  • 22
  • 31
  • Do you have infopath? Can you recreate that template somehow in infopath with fill-able fields? If yes, then you can perhaps write a macro to fill up the forms and saving them as pdf won't be a big deal then. I will help you with macro if this sounds useful to you. – tumchaaditya May 03 '12 at 03:59
  • @tumchaaditya I don't have infopath and even if I do, creating the template in infopath may be a bit tedious because I have quite a lot of templates. – bobo May 03 '12 at 05:01
  • does the answer i posted help you? because one way or other, you are gonna have to define fields(i.e. positions) onto that image.Otherwise, there ain't a way by which the text is gonna go and sit in right place – tumchaaditya May 03 '12 at 08:18
  • @tumchaaditya it does help a bit but it seems I will have to first convert the image into a pdf and then use Adobe Acrobat Professional (which I don't have) form editor to put the placeholders on it before I can start using the program in your answer. – bobo May 04 '12 at 08:21
  • @tumchaaditya I am actually expecting an existing application that has thought about my use case. I think my use case is quite common but I could be wrong. – bobo May 04 '12 at 08:24
  • oky..i'll try to find something...btw, which excel version are you using? – tumchaaditya May 04 '12 at 08:42
  • one more thing, while going the mail merge way, insert image into word as usual. and THEN set "Text Wrapping" to "Behind text". That way, you will be able to type OVER that image. Then perhaps you will able to adjust the text position correctly. – tumchaaditya May 04 '12 at 09:08
  • @tumchaaditya I am on Excel 2010 but I can save in csv format if the program needs that. The mail merge way actually works but accurately positioning a placeholder takes a lot of effort, especially the vertical positioning (requires a lot of paragraph margin adjustment). – bobo May 04 '12 at 09:53

2 Answers2

3

This article should give you what you need. you will just have to create a PDF form using the image you have. the procedure there creates new PDF for each entry. You will be able to modify it to get all entries in one PDF. If you cant, I'll help you with that part.

EDIT

I think I finally got this. Go the mail merge way.

Make your picture behind text as written in my previous comment. After that, Go to "Insert"->"Shapes"->"Textbox" and insert and arrange the textbox on top of your image.

The advantage of this is you can drag the textbox freely around the document. This will rid you of the pain of using spaces and tabs to adjust text position.

Then use mail merge and merge data from excel with the textboxes.

Finally, there's a simple free add-on that lets you to save to PDF directly from word. Find it here.

I hope this solves your problem.

Siddharth Rout
  • 432
  • 3
  • 9
tumchaaditya
  • 3,752
  • 5
  • 39
  • 57
1

I've done something similar before, but probably not as complicated. More importantly, it was done in Linux shell. My practical use was for generating name-tags for a conference with a namelist table with attributes such as title, institution, etc..

I basically converted the excel file into csv format (to reduce need for parsing), and used imagemagick to read and populate elements in an image template in a loop. The whole thing was written in bash. I would think that the same can be achieved using Perl + PerlMagick in windows. Imagemagick can also handle image to pdf.

The "place-holders" would be basically be chunks of imagemagick commands that also anchor the location of each element.

Reuben L.
  • 1,052
  • 6
  • 15