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.

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.

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

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).

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.
This article was last modified on October 10, 2023
This article was first published on October 9, 2023
Commenting is easier and faster when you're logged in!
Recommended for you
Designing Forms with InDesign? Acrobat’s Replace Pages Feature is at Your Service.
Revising a PDF form doesn't have to mean a lot of work.
InDesign CS3 Inside InDesign CS3!
One of the most useful features in InDesign CS3 is also one of the most unexpect...
Inside QuarkXPress: The Building Blocks Behind Effective Business Card Design
Application: QuarkXPress 4.x Operating systems: Macintosh, Windows There are two...
