Graphics

When you place an image in InDesign, it is typically placed in a rectangle. You can verify this in the usual way: place an image, select it, then type app.selection[0] in the ESTK’s console and press Enter/Return. The ESTK responds with [object Rectangle]. Rectangles are similar to text frames in several ways: for example, their size and position is stored in the same geometric bounds. Text frames and rectangles also share properties such as label and stroke, and methods such as move(). The main difference, naturally, is their contents: text frames contain text, rectangles contain images.

Get Scripting InDesign CS3/4 with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.