Reply To: Position new text boxes

#90218
Peter Kahrel
Participant

You can use the bounds property of the page. It compares with a frame’s geometricBounds. To place a box (200 wide, 75 high) at the bottom-right of the first page of a document, do this:

width = 200;
height = 75;
pageBounds = app.documents[0].pages[0].bounds;
app.documents[0].textFrames.add ({geometricBounds: [pageBounds[2]-height, pageBounds[3]-width, pageBounds[2], pageBounds[3]]});

Peter

This article was last modified on December 1, 2016

Comments (0)

Loading comments...