• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[JS] How to set page size?

Contributor ,
Nov 23, 2016 Nov 23, 2016

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guru , Nov 23, 2016 Nov 23, 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

Tre

...

Votes

Translate

Translate
Guru ,
Nov 23, 2016 Nov 23, 2016

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines