Skip to main content
Participant
May 25, 2020
Answered

Fill PSD picture with data from CSV and scale text according to content size

  • May 25, 2020
  • 1 reply
  • 4688 views

Hi folks,

 

I figured out how to add text from a CSV file automated into a PSD file, which is a pretty cool feature.

In my case the text coming from the CSV file is between 10 chars and 300 chars long. 

I also figured out a script that can adjust the text size according to length of the content. Which is also fine.

 

BUT, I have no clue how to combine the two action. I would like to pull data from the CSV and directly run my script over those images, to scale each and every text accordingly.

 

Hope that make sense so far? 

 

And hint is really appreciated....

 

Thanks and best regards from Zurich

 

Tim

This topic has been closed for replies.
Correct answer Stephen Marsh

What file format and save options would the batch script use? There are many examples on the forum.

 

This will likely be a two step process as the variable data merge has to create and save each data set, I don't believe that it can be interrupted.


The easiest way to batch a script is to record the script into an action, then use the Automate/Batch command or default Image Processor script. Another option is to use the Image Processor Pro script add-on.

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html?m=1

 

1 reply

Bojan Živković11378569
Community Expert
Community Expert
May 25, 2020

If I can understand your question correctly then you must export PSD files with data from CSV then to run batch to scale text, I believe it is not possible to do everything in one pass. I am assuming that you have multiple data sets in your CSV files.

 

Now comes hint: do you know that you can apply data set? Image > Apply Data Set. If you apply data set it will be used in your template, text will be pulled from SCV and applied to text layer so you can run script to scale text and perhaps export image. Next you can apply next data set and run script again. I tried to record step in action to apply data set and it works so you can probably automate process.

 

I must add and this hint: before running action or script to apply data sets and to scale text... you must load data sets manually using Image > Variables > Data Sets > Import > then navigate to data sets and import file. I do not know for way to automate this task, perhaps you can find it, just to let you now that this part can not be automated using Photoshop action.

TimZurichAuthor
Participant
May 25, 2020

Thanks Bojan,

 

Yes I already know how I can attach the data set. Thats fine. The problem is just the resizing of the text my pictures.

My data set has roughly 400 entries. So 400 pics get produced. And I need to rescale the text within each picture. If I need to do it one by one, the whole operation is not usefull.

 

May be I somehow can run the script after I produced all my 400 psd and resize the text for all 400 in a batch.

 

Unfortunately, my script skills a very limited. I dont know, how to open a folder, get all pictures, open them, run my resize logic (which is working fine) and then save it again.

 

Cheers

 

Tim

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
May 25, 2020

What file format and save options would the batch script use? There are many examples on the forum.

 

This will likely be a two step process as the variable data merge has to create and save each data set, I don't believe that it can be interrupted.


The easiest way to batch a script is to record the script into an action, then use the Automate/Batch command or default Image Processor script. Another option is to use the Image Processor Pro script add-on.

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html?m=1