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

Changing page size after applying master page

New Here ,
Apr 01, 2020 Apr 01, 2020

Copy link to clipboard

Copied

Hi.

I'm applying master page to my page from script (JS), like this

page.appliedMaster = doc.masterSpreads.itemByName(masterPageName);

This code changes page's size, but I want to keep it as it was before applying master page (like when in Indesign and it asks you whether you want to keep page size or apply master page size). I found page's bound attribute, from which I can save previous page size, but can't find how to apply them after. Do you have any suggestions?

 

Thank you!

TOPICS
Scripting

Views

355

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
Advocate ,
Apr 02, 2020 Apr 02, 2020

Copy link to clipboard

Copied

Just from reading the InD.sdef, I can imagine to apply with properties (record) : A property that allows setting of several properties at the same time. …But I cant see the bounds there.

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
Community Expert ,
Apr 02, 2020 Apr 02, 2020

Copy link to clipboard

Copied

LATEST

Here's one way to resize a page:

myPage.resize (
  CoordinateSpaces.INNER_COORDINATES, 
  AnchorPoint.TOP_LEFT_ANCHOR, 
  ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH, 
  [newWidth, newHeight]
);

I think the new dimensions should be in points, not sure about that.

 

P.

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