Skip to main content
Inspiring
November 24, 2016
Answered

[JS] How to set page size?

  • November 24, 2016
  • 1 reply
  • 3528 views

Hi.

I want to resize only one page.

"page.bounds" is read only and I don't know that use "page.resize()", "page.reframe()".

I want to just resize page by set width, height or bounds.

Please help..

Thanks in advance.

This topic has been closed for replies.
Correct answer Trevor:

A very quick guide to resize.

app.activeDocument.pages.everyItem().resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[72*5,72*7]);

Will change all the pages to 5 inches 5 by 7 across, that is 72 points per inch for mm do 72 * 5 / 24.1 for 5mm

Look up Adobe InDesign CS6 (8.0) Object Model JS: Page

Marc has several chapters on the topic but if you play around with the one liner above you should be able to do most of what you need.

HTH

Trevor

1 reply

Trevor:
Trevor:Correct answer
Legend
November 24, 2016

A very quick guide to resize.

app.activeDocument.pages.everyItem().resize(CoordinateSpaces.INNER_COORDINATES,AnchorPoint.CENTER_ANCHOR,ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH,[72*5,72*7]);

Will change all the pages to 5 inches 5 by 7 across, that is 72 points per inch for mm do 72 * 5 / 24.1 for 5mm

Look up Adobe InDesign CS6 (8.0) Object Model JS: Page

Marc has several chapters on the topic but if you play around with the one liner above you should be able to do most of what you need.

HTH

Trevor