A Script to Preview Text From the Next Page in InDesign

A new script by Peter Kahrel can automate the process of sampling text from the following page in InDesign

Did you ever need to place a sample of text from the next page in an InDesign document? It’s not a common need, but a cool script from Peter Kahrel can do the job for you.

You can even control the number of words that are sampled.

First, go to the parent page and add a text frame. Then, go to the Layers panel and label that frame preview.

screenshot of Adobe  InDesign template parent pages with Howard Johnson's ice cream flavors

On the document page where you want the preview to appear, override the frame from the parent page.

Select any frame in the story containing the text you want to sample and run the script.

screenshot of Adobe  InDesign document pages with Howard Johnson's ice cream flavors

The preview frames will be populated with the first few words from the following page.

screenshot of Adobe  InDesign document pages with Howard Johnson's ice cream flavors

If you need to change the number of words that are sampled, edit the script. In line 22, change the value of the second number in the parentheses after itemByRange. Counting in JavaScript starts with zero, so (0,2) means sample the first three words. To sample the first four words, change it to (0,3).

screenshot of InDesign script to sample text from the following page

The preview isn’t dynamic, so if the text is edited or reflows, you need to run the script again to update it.

Click here to read the forum post that inspired the script.

Click here to download the script.

Bookmark
Please login to bookmark Close

This article was last modified on October 10, 2023

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...