At work, we will inevitably encounter some repetitive design work, boring and boring.

* After reading this article, you will learn the following tips:

  1. Batch replacement of text or images using PhotoShop data sets.

  2. Batch import and export of multivariable data groups.

  3. Complex variable, text and image manipulation.

* Applicable application scenarios:

  1. 300 invitation letters are designed and printed, which need to correspond to different guest names;

  2. Design of business card or job card for 500 employees, corresponding to different names, positions, telephone numbers and other information;

  3. Large-scale e-commerce poster design, corresponding to different product pictures, copywriting, price and other elements;

# Prepare required documents:

# Effect preview:

Above is 500 different text information gifs output according to the sorted Excle table.

1. The following figure is the excle/ Pages form that has been sorted out:

2. The picture below is exported in batches according to variable data groups in the table:

3. The following figure shows the PSD file and corresponding JPG file output according to the name in the table (when exporting, the naming format can be set to match the data content) :

* Operation tutorial:

Step 1: Define variables

1.1. Take the illustration of “business card” as an example. Firstly, arrange the layer in PhotoShop, find the area to be changed and define it as a variable (variable content support: text, picture);

1.2. Select the text you want to change in the layer

1.3. Click “Image” – Select “Variables” – click “Define…”

1.4. In the popup window, select “Text Replacement” and name it “Name” (the name should be the same as the variable group name in your table).

* A “*” after the layer name means that the variable has been defined; If more than one text needs to be changed, they are defined as variables;

1.5. After defining the variables, click “OK” to complete the first step;

Step 2: Organize the data set

1.1. Take the figure “table” as an example, special attention should be paid to the following points during collation: There should be no “space” after the data text;

1.2. The first row of the table should be named with the corresponding variable name, and PS will match the column of the corresponding variable name to obtain data.

* Careful use of “search and replace” to remove strange Spaces helps later!

* If the variable content is an image, the value is the address of the file where the image resides, for example, /Users/Bm/Documents/ Application of variables /img5.png

1.3. After sorting out the table, export it to “Plain text TXT (separated by tabs)” ANSI coding format; Or “CSV (comma separated)” format;

In this step, the MAC system can use its own text editor to create plain text TXT format

However, its encoding default UTF-8, does not support ANSI, will lead to PS special characters cannot be recognized;

The best way to do this is to use Windows or other third-party tools.

1.4. Take the figure as an example. This is what the table looks like after it is exported to plain text.

1.5. Once the table has been saved in plain text, step 2 is complete;

Step 3: Import the data group

1. Next comes the most important step, importing the plain text data table into PHOTOSHOP, which is also prone to big and small problems.

1.1. Click “Image” — select “Variables” — Click “Data Group”

1.2. In the pop-up menu, click “Import”, select your plain text file, check “Replace existing data group” and “Use column 1 as data group name”, click “Apply” and “OK”;

1.3. If you are lucky, you can check “Preview” after the import is successful and view the changes of the corresponding data on the picture in the data group drop-down menu;

1.4. However, if an error message is displayed after the import, click “OK”, you need to modify the data group file accordingly;

# Error code:

(1)… . Too many variable names in the first line.

(2)… . Line ‘N’ contains incomplete variables.

(3)… . Unrecognized character ‘ ‘.

… Etc etc.

The main solutions are:

1. Change the variable name to English characters, for example, Name.

2. Plain text data groups using ANSI encoding format;

3. Remove weird “whitespace” in plain text files (most common error)

Shown at the picture, for example, after “number2” field, the cursor and field between a “space”, lead to prompt “too much” the first line of variable, check the time just delete the blank space, when the “space”, at the end of the data field will contain incomplete variable, just need to delete the blank space, and more appear in the text after the last column.

1.5. After the data group is successfully imported and can be previewed, the following is basically unimpeded, so far, the third part is completed;

Step 4: Batch export PSD

1. The next step is to export data sets to PSD easily; Click File – Export – Data group as file

2. On the menu that is displayed, set the naming rule for the file to be exported. File name – Data group name.psd; Select the folder and click OK to export all PSD files.

Step 5: Export JPGS in batches

1. The last step is to convert the PSD files we have obtained into JPG files in batches, and click “File” – “script” – “Image Processor”.

2. In the pop-up menu, click “Select Folder” to find the PSD folder to export, select the required format, configure the required actions, and click “Run” to export

Finally, you’re done! Get the following output list ~

After a successful use of ~, later encounter the same situation can save a lot of time!

My colleague used this technique to process 800 pictures of employee information station cards at one time, corresponding to different employee names, telephone and email addresses, photo station numbers and other information.

Hope my article can bring you help ~