Swimmer PL

for use with Adobe® InDesign® 2026 or higher.

Swimmer Logo

What is Swimmer?

Swimmer (SWitch IMmagER) is a script for Adobe InDesign.

In a catalog or brochure you might need little icons for ‘microwave safe’ , ‘food safe’,or ‘hand wash’… or such like.

Instead of painstakingly creating inline images, you can just use some code word or key word of your choosing and then replace all those words in one fell swoop.

Swimmer will search your InDesign document, looking for specific key words or key phrases and replace these with small inline images or icons.

Running Swimmer again reverts the document back from images to key words.

Installing Swimmer PL

  1. Download, install and start PluginInstaller. Close InDesign. Clicking the following link will trigger PluginInstaller.
  2. Click this link to fetch Swimmer PL: Swimmer PL. Then click the Try… or Install… button, or click the … button to see all install options.
  3. Restart InDesign.

PluginInstaller installs the files for you. Swimmer.jsx and Copy Sample File with Documentation to Desktop.jsx appear in the User section of the InDesign Scripts panel (Window → Utilities → Scripts).

Alternatively, you can install this software directly from PluginInstaller. Select Available Software, then scroll through the list and/or use the Search box to locate Swimmer PL.

Demo Version/Purchasing

Swimmer comes as a demo script: you can run it 10 times per 24 hours; after that, you need to wait until the next day before you get another 10 script runs out of it.

If you want to upgrade to a full version, you need to purchase an activation: an activation costs you US$ 9.00 per seat and it will last for a year.

To buy, find Swimmer PL in PluginInstaller’s Available Software list. Choose Buy from the … menu and follow the checkout.

Configuration

You define the behavior of the script by modifying the configuration data in the text frame on the pasteboard.

INI configuration frame

The format is pretty self-explanatory; skip ahead to ‘Description of the Options’ if you ‘grok’ things already.

Here is the detailed TL;DR information for the formatting rules:

The text frame is formatted in a format similar to the old-style Windows INI format, with some additional flexibility built-in.

The advantages of this approach is that each document can ‘carry’ its own configuration and the configuration is plain for everyone to see, in a human-readable form, rather than being hidden away on some preferences dialog.

  • The information is spread over multiple paragraphs or lines.
  • There are two types of relevant lines: [SECTION] or name=value. Any lines that do not consist of either a name in square brackets or a name, an equal sign and a value are ignored.
  • The information within the square brackets (the SECTION) or information to the left of the equal signs should not be edited (the name).
  • The name to the left of the = are case-insensitive and only letters a-z and digits 0-9 are taken into account. Names like abc, a B c, or A'b'c are all interpreted as the same thing – abc
  • The information to the right of the equal signs can be freely edited
  • By default, leading and trailing spaces are ignored.
    someData =some Value
    someData=       some Value
          someData      =        some Value

    are all equivalent – they all mean someData="some Value"

  • Quotes can be used to express leading or trailing spaces. Curly quotes are seen as equivalent to regular quotes.
    someData = "  some Value  "
    someData= “  some Value  ”

    both indicate that someData="  some Value  " including the leading and trailing spaces.

  • Numeric values can have units and the script will auto-convert between units as needed. If the horizontal unit is cm and the label frame width is written as 1 inch, the width will automatically be interpreted as 2.54 cm

Description of the options

The configuration frame contains a single [config] section followed by one or more [replace] sections. Each [replace] section represents a single keyword or key phrase and its associated image file.

base folder

Appears in section [config]. This tells the script where to find the images. This is either a path relative to the document’s folder, or an absolute path to a location somewhere else.

The sample document SwimmerSample.indd that comes with Swimmer is accompanied by a folder SwimmerSampleImages which contains the sample images. That folder needs to remain ‘beside’ the document for the sample demo to work.

text

Must appear in every [replace] section. This is a GREP expression (JavaScript GREP, not InDesign GREP). \b means ‘word boundary’, so \bword\b will match ‘word’ but won’t match ‘password’.

image name

Must appear in every [replace] section. This is a file name of an image file located in the base folder

case sensitive

Optional. Can appear in the [replace] section. Setting this to 1 makes the textpattern be case sensitive.

object style

Optional. Can appear in the [replace] section. This is the name of an InDesign Object Style that needs to be applied to this image when it is inserted into the text.

If this is omitted, an object style SwimmerObjectStyle will be applied by the script. You can use this object style to tweak the positioning by modifying the anchored object settings of the style.

Version history


Version 2.0.4: October 20, 2026
– Updates to CRDT_ES

Version 2.0.1: January 16, 2025
– Configuration can also come from a sidecar file

Version 2.0.0: June 26, 2024
– Updated script to work with CRDT_ES and PluginInstaller.