Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I am new to Photoshop. I have a Photoshop template with 3 text layers.

How to create a batch job for:

  1. creating .psd files by image name (each line has a unique name in CSV file) with Photoshop ?
  2. Then I want to replace three text layers with my text in CSV
  3. Finally I want to import jpeg images (that is in a folder) in each newly created .psd file. Each .psd file and image names in JPEG should matches.

Below is the example of my CSV file:

psdfile1, Image1, textlayer1, text layer2, text layerA
psdfile2, Image2, textlayer1, text layer2, text layerB
psdfile3, Image3, textlayer1, text layer2, text layerC
psdfile4, Image4, textlayer1, text layer2, text layerD
psdfile5, Image5, textlayer1, text layer2, text layerE

How can I create such a batch job, creating .psd files by image name (each line has a unique name in CSV file) usung Photoshop?

share|improve this question
add comment

1 Answer

ExtendScript (ie JavaScript) is your friend. I can't write the code off the top of my head, but your process is pretty straight forward.

  1. Load each line in the CSV file as a separate array of strings.
  2. Open the template doc in Photoshop.
  3. For each array (ie line in your CSV):
    1. Replace the content of each text layer in succession with the appropriate array element.
    2. Save a copy of the file under the name in that same array.
  4. Loop through the remaining arrays and repeat step 3.
  5. Close the doc without saving.

Done. Couldn't be easier. Well, you know, after you debug the code for a couple hours that is ;)

You didn't say what version you're using. Whatever it is, you'll find the official guides and reference dictionaries here.

share|improve this answer
    
I don't know how to do step 3 and 4. –  user2079508 Aug 16 '13 at 20:53
    
If you can get past #1, 4 should be cake. I don't have time to dig into the scripting dictionary right now to solve #3. Did you try digging through the docs at the link I provided? That's where I'd start. Unless you really love digging through the data browser in ExtendScript ;) –  plainclothes Aug 16 '13 at 21:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.