Featured Script

Automate Placing Images with Caption Option

This month the feature script automates placing images to a document grid using information from a custom dialog. Information for the images to be placed are read from a plain text file. Each item element (image name, caption, description) are entered as separate paragraphs in the file.

Step 1 Get Parameters for Grid

Custom dialog for setting grid parameters

An enabling group allows the option for designating the number of items read from the text file to be used for each grid cell.

If Add Caption is not checked the grid will place each item read from the file (the image name) into the grid.

Step 2 Create and Populate Grid

The script calculates geometric bounds for each grid cell based on information returned from the custom script.

The image percentage value determines the height for the image and the caption containers within each grid cell.

The image and text are placed based on information read from the plain text file. It is important that the number of elements per cell entered in the custom dialog match the number of paragraphs provided for each grid item in the plain text file.

Step 3 Styling

Shows Paragraph option setting for object style

Styling for the text frame is determined by the object style chosen in the custom dialog.

The style should provide for paragraph styling by setting the Paragraph Style property for the style.

Script Download

The download is Place Images to Grid with Caption script written for Adobe InDesign CC 2019. The demonstration script is currently available only for AppleScript. It is provided as an example from which readers can create their own. No warranty is given for the completeness or reliability of this script.

Automate Image Placement With Caption Option Automate Image Placement With Caption Option 13