-
1. Re: Need to populate gift certificate and save as image...
JJMack Dec 10, 2010 10:58 AM (in response to mrdior)I'm quite sure with Photoshop scripting you could read and parse a CSV file and do what you want. However you need to script the complete process. Your script would also need to have a Template file or a text formatting design for populating the text overlays you want, a way to open the image file(s) you want or work on the image(s) that is/are currently open in Photoshop. And an output folder and naming convention to be used. Quite a bit of work fully design the whole process before you try to code it.
-
2. Re: Need to populate gift certificate and save as image...
Muppet Mark-QAl63s Dec 10, 2010 11:00 AM (in response to mrdior)Dependent on the context of your 'text' my first choice of app would be ID far more available to you within its DOM for control/formatting text. Next I would use Illustrator but only if you don't have ID. Photoshop I would use if the text was pretty basic in nature… Reading in the CSV is the same for all but most of this depends on the text and the required out format?
-
3. Re: Need to populate gift certificate and save as image...
Paul Riggott Dec 10, 2010 11:09 AM (in response to mrdior)Have a look at "Data-Driven Graphics"
-
4. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:17 AM (in response to Muppet Mark-QAl63s)Thanks MM. The text CSV file would basically comprise a 'unique id', a 'name', an 'email address', a 'dollar amount', and 'valid date range'. I do have CS4 with InDesign, PS, AI, Acrobat 9.
I'd like to output the graphic as a JPEG.
Incidentally, I saw another of your posts here -- http://forums.adobe.com/message/2710264#2710264 -- where you include some great code to help another poster script Illustrator actions. I guess my question has to do with how to get started. First step, I must create the text overlay layers and give them variable names. Is there a good reference for stepping through this process?
-
5. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:24 AM (in response to JJMack)Thanks JJMack. Yes, I think I have a fair grasp on the process. As follows:
1) Create gift certificate base graphic
2) Create text overlay layers as addressable layers
3) Save as .ai file
4) Create CSV format that includes 'unique id', 'name', 'email address', 'dollar value', 'valid start date', 'valid end date'
5) Write script (Javascript, Applescript, other?) that opens the CSV file and reads each row
6) For each: Populate text fields; Save as JPEG at good print resolution
I can work out the folder naming convention later...
-
6. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:32 AM (in response to Paul Riggott)Thanks Paul. I did find that last night. That can get me started with defining the 7 or so text fields... I was a bit disappointed with the information regarding the actual scripting, however.
-
7. Re: Need to populate gift certificate and save as image...
Paul Riggott Dec 10, 2010 11:42 AM (in response to mrdior)There is no scripting required using Data-Driven Graphics
Here is a tutorial that might help...
-
8. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:43 AM (in response to Muppet Mark-QAl63s)MM, unless I'm missing something, I'm guessing I don't need ID because of its DOM capabilities.
-
9. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:55 AM (in response to Paul Riggott)Paul, that Youtube video was GREAT! Thanks. Totally stripped the mystery away from automating the process of generating images with variable text / image overlays.
Now, the process described here explained that you can only save as PSD. And that if you wanted to save in any other format you would have to batch process the resultant folder of PSDs. In my case, I would have to go back in, open each PSD in turn and save as a JPEG suitable for printing.
That, I'm guessing, would involve some scripting... correct?
-
10. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 11:58 AM (in response to Paul Riggott)Paul, I guess the following link explains batch processing (in CS3). I will check out for CS4...
-
11. Re: Need to populate gift certificate and save as image...
Paul Riggott Dec 10, 2010 12:01 PM (in response to mrdior)No scripting again, File - Scripts - Image Processor will do the job for you.
-
12. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 12:15 PM (in response to Paul Riggott)Ok. That's awesome. I am right now devising a first test of this particular process. Starting with what's described in the Youtube video (again, thanks!!) and then using the PS Image Processor.
Actually... wait... Paul, is there a way to use the Image Processor before saving as PSDs? So I can skip the PSD generation step and just save as JPEGs??
-
13. Re: Need to populate gift certificate and save as image...
Paul Riggott Dec 10, 2010 12:24 PM (in response to mrdior)Sorry no, if you need JPG they will have to be converted after.
-
14. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 1:40 PM (in response to Paul Riggott)Ok. I've successfully created 4 psd files based on 4 rows of the imported CSV data. The only "issue" I see with them is that there is no preview image available because -- as the preview says (under Mac OS) -- This layered photoshop file was not saved with a composite image. When I open the file it is correctly initialized.
Now, the Image Processor is failing to work on the 4 psd files. I get a message stating --
<photoshop warning message>
Sorry, I could not process the following files:
/Users/Shared/.../Certificates/output
output
output/eVoucher_UNIQUEID1.psd
/Users/Shared/.../Certificates/output
output
output/eVoucher_UNIQUEID2.psd
/Users/Shared/.../Certificates/output
output
output/eVoucher_UNIQUEID3.psd
/Users/Shared/.../Certificates/output
output
output/eVoucher_UNIQUEID4.psd
</photoshop warning message>
What's wrong??
-
15. Re: Need to populate gift certificate and save as image...
Paul Riggott Dec 10, 2010 2:08 PM (in response to mrdior)I haven't seen that error message before and it isn't useful. What you can do is open one of the files and try to save it as a jpg and see if there is a problem doing so. If that works check the image processor fields are all correct and try again.
-
16. Re: Need to populate gift certificate and save as image...
mrdior Dec 10, 2010 2:47 PM (in response to Paul Riggott)No, it isn't very helpful. I don't think it's ever opening the files. I did open one of the generated psd files and saved it manually as a JPEG image. No problem.
Headed out with my wife tonight... when I get back I'll double check the way I'm generating the psd's. Otherwise, the Image Processor setup seems pretty basic... don't see what I'm messing up there!
-
17. Re: Need to populate gift certificate and save as image...
Michael L Hale Dec 10, 2010 2:58 PM (in response to mrdior)For the 'composite image' issue you might want to check your preferences and make sure that under file handling 'Image Preview' and 'Maximize PSD..." are both set to always or ask. It will take Photoshop a little longer to save the psd but it should do so in a way that other apps( or the OS ) can show a thumbnail.
Image Processor only gives generic error messages. It may have had trouble reading or writting those image. It should convert to 8bit and remove any alpha channels so I would follow Paul's advice and check the files manually to see if you can tell what the problems are.
-
18. Re: Need to populate gift certificate and save as image...
mrdior Dec 11, 2010 6:50 AM (in response to Michael L Hale)Michael, yes, I checked Preferences > File Handling. As I suspected, Image Previews and Maximize PSD etc are enabled... bc I always get image previews with all my other PS work. But thanks for pointing me at this menu bc I've actually never paid attention to it!
So what this means to me is I have a mystery to solve about why Image Processor is not working. Any guidance on how to prepare a PSD file for Image Processor automation?
-
19. Re: Need to populate gift certificate and save as image...
mrdior Dec 11, 2010 7:07 AM (in response to Michael L Hale)Aside from choosing the PSD source directory... and setting the image destination directory (in my case, same folder)... and checking 'Save as JPEG' (Include ICC profile is already checked)... is there anything else I need to do in the Image Processor configuration window?
Do I need to 'Load...' anything?
I guess I'll go look up info on the IP...
-
20. Re: Need to populate gift certificate and save as image...
mrdior Dec 11, 2010 7:21 AM (in response to Michael L Hale)Hmm. Am I supposed to check 'Run Action' in the Preferences section of the Image Processor menu? I found another post on the forum...
http://forums.adobe.com/thread/433627
which shows a screen cap of the IP menu. In that thread, when 'Save as PSD' is checked, it shows 'Save as Photos...' in the drop-down under Default Actions.
I don't have that choice. Any guidance anyone?
-
21. Re: Need to populate gift certificate and save as image...
mrdior Dec 11, 2010 11:04 AM (in response to Michael L Hale)Hey Michael. Apparently, I had to set Maximize PSD... to Always. Ask didn't result in any prompts (guess that makes sense) and thus there were no image previews. So this part of my question has been solved. But still don't know why Image Processor is not reading the generated PSDs and spitting out jpegs.
Muppet Mark wrote in my other (latest) post that perhaps I should bypass the IP altogether and just batch process the directory. I suppose I could do that... but WHY WON'T IMAGE PROCESSOR WORK FOR ME!?!?!? grr. ;-)
-
22. Re: Need to populate gift certificate and save as image...
mrdior Jan 20, 2011 8:17 AM (in response to mrdior)I've got a question that's incidental to the process of generating personalized gift certificates from a data set...
Ultimately, these gift certificate images will be sent in an email and will need to be printed out by the recipient. I would like them to print crisp / clean (like a vector)... but I'm generating images via PS4. Does anyone have any recommendations for resolution / image size that won't result in the gift certificate breaching 500KB, and yet it will still print beautifully?
Does anyone think I should switch to AI4 and generate, instead, HTML for sending in an email? Is the process for creating variables and reading in a data set and exporting HTML code (that I can then drop into an HTML email), easy? Is the process similar to what is described in the linked PS tutorial video (in this thread)?
Any answers greatly appreciated!

