A JSX Photoshop CC 2019 based script for replacing images and text , also saves a .jpg file and a .psd file in the result folder. Takes text input from a .json file
Say you want to generate Participant Certificates using this script in photoshop 2019 CC or similar:
-
Open photoshop and add folders/group with names "text" and "baseImage".
-
Create the desired background for the Certificate inside the baseImage folder:
-
Inside "text" Title Group(or folder) add the "participantName" text layer and place it on the desired position and appropriate text size. We will use the script to change this text.
-
Download the script from https://github.com/avialxee/photoshop-jsx
by clicking Code > Download Zip
-
Unzip the folder to a desired location and copy your photoshop file inside the unzipped folder. If you dont wish to keep the Photoshop file inside the folder follow the Step 4 in Customize and proceed with the next steps.
-
Open
input.json
file in your favourite text editor and replace the values corrosponding to name.{ "name": ["Avinash Kumar", "Lorem Ipsum"] }
-
Run the script following the demo or follow the following:
-
The group names can be changed according to your preference:
Open
autotype.json
to find and change thebaseImage
to a desired group name. Similarly for thetext
group name. -
If you dont want alerts each time an image is saved, comment the line 49:
// alert("saved Jpeg");
Similarly one can comment the next line if you dont wish to save the .psd files.
-
To change the output folder path change the following:
var outpath = thePath+'/output/';
-
If you wish to have a destination folder containing output somewhere separate from the photoshop file. Add the destination path to
thePath
.var thePath = 'path/to/destination';