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

Modifing the master page through ExtendScript

Community Beginner ,
Sep 19, 2025 Sep 19, 2025

Hi everyone,
I would like to use ExtendScript to modified the master page of my document but it doesn't work.
Here is my code:

 

var doc = app.ActiveDoc;
var mp = doc.FirstMasterPageInDoc;

var tempWidth = mp.PageWidth;

mp.PageWidth = mp.PageHeight;
mp.PageHeight = tempWidth;

When I look into my variable with a debugger, it behave like it is in read-only mode
TOPICS
Scripting
150
Translate
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

Community Expert , Sep 22, 2025 Sep 22, 2025

You can rotate a master page in the interface (Format > Customize Layout), but I can't find a property to do it programmatically.

Translate
Community Expert ,
Sep 19, 2025 Sep 19, 2025

This screenshot is from the FDK Reference, which is more useful than the ExtendScript documentation. The dagger indicates a read-only property. A FrameMaker document can only have a single size for all of its pages.

image.png

Translate
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 Beginner ,
Sep 22, 2025 Sep 22, 2025

Thank you for the awnser !
Changing the dimension was a workaround I was thinking about to make some specific pages to turn into a landscape mode, do you know if there is a parameter I can change in extendscript to do that ?
Thanks in advance for your awnser !

Translate
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 ,
Sep 21, 2025 Sep 21, 2025

Hi Theo,

Did you want to modify the page dimensions? -> See Rick's post.

Or the main text frame dimensions and its position?

Best regards, Winfried

Translate
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 Beginner ,
Sep 22, 2025 Sep 22, 2025

I'm trying to make some pages move into landscape mode.
It seems pretty basic to me so I assume it's possible but I don't know how, can you help me with that ?
Best regard, Théo

Translate
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 ,
Sep 22, 2025 Sep 22, 2025

You can rotate a master page in the interface (Format > Customize Layout), but I can't find a property to do it programmatically.

Translate
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 Beginner ,
Sep 22, 2025 Sep 22, 2025
LATEST

Thank you for your help
I will keep you updated if I found a solution

Translate
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