Skip to main content
Balaji Murugesan
Known Participant
Apr 23, 2024 4:08 PM UTC
Answered

Resize a selected pages in InDesign using javascript

Hi Team, 

Please let me know how to change a particular page size in the document using javascript.

 

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
rob day
rob dayCorrect answer
Community Expert
Apr 23, 2024 4:33 PM UTC

Hi @Balaji Murugesan , Use the resize() method. Here‘s an example that resizes the active page:

 

var w = 500
var h = 950
var p = app.activeWindow.activePage;
p.resize (CoordinateSpaces.INNER_COORDINATES,AnchorPoint.CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,h]);

1 reply

rob day
Community Expert
rob dayCommunity ExpertCorrect answer
Community Expert
Apr 23, 2024 4:33 PM UTC

Hi @Balaji Murugesan , Use the resize() method. Here‘s an example that resizes the active page:

 

var w = 500
var h = 950
var p = app.activeWindow.activePage;
p.resize (CoordinateSpaces.INNER_COORDINATES,AnchorPoint.CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[w,h]);
Translate