If you’ve ever wanted to make some good looking name badges for an event, chances are you created a nice Photoshop file and spent hours editing the text layer that had the persons name. Edit, print, edit, print, edit, print, and on and on. But, there is a better way and it's been hiding in Photoshop for years. Create hundreds of variable images in just minutes!!
Today Photoshop supports data-driven graphics, a fancy way of saying “OMG, I can make a hundred name tags in just a couple minutes”. And we’re not just talking name badges. I can dynamically replace text, pixels or even hide and reveal layers based on the contents of a data file.
I made name badges for everyone on our Ireland Tour and I was able to do it in just a few minutes. Let’s take a look at what steps I went through to accomplish this.
Create your graphic
The first thing to do is just design the name badge. In my case, I used a background image and then created a text layer for the person's name and one to indicate where they are from. I used a font that looks Celtic and applied some layer styles to make the text pop.
I also named each of these layers. They will show up in menus later so it helps me keep track of what each layer contains.
In our sample here, we want to use variable data for the person’s name and the City/State. Once the layers are created and named we just have to tell Photoshop that those layers will be replaced with variable data.
- Go to Image > Variables > Define.
- Select one of the layers with content that you’d like to define as a variable. In our case, the name or location layers.
- Define the type of variable - for the name badges it’s Text Replacement but look, Oh yeah, there’s a lot you can do with this.
- Define a name for your variable - there are some specific rules but basically, no spaces or special characters. Use all alpha characters and you won’t have a problem.
- click OK.
Import Your Data Set
Now that Photoshop is ready to read all the data, we need to import the data file with all the detailed information. Photoshop wants to read a simple text data file. Either a comma-separated (CSV) or tab-delimited file. If you’ve got the information in an Excel spreadsheet, you can easily save the data as a comma-delimited file.
Make sure you have a column name at the top of each column of data. I like to use single words, no spaces. It just makes things easier. This name should match the name used to define the variable layer in Photoshop.
- Go to Image > Variables > Data Sets
- Select Import… and select the data file you created above.
Generate Graphic Files Using Data Sets
Once you’ve defined the variables and the data sets you can now generate all the individual PSD files.
- Select File > Export > Data Sets As Files
- Enter the base name you want for all your files.
- Select a destination directory for all your files.
- Choose the data sets to be exported.
- Click OK
Photoshop will only save PSD files so if you want these images as JPG, or some other format, you’ll have to batch process them. That can be done in Photoshop or Lightroom.
For more detailed information about this, check your Photoshop User Guide and search for “Create data-driven graphics”.