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

MarginPreference in InDesign CS5 js

Participant ,
Sep 03, 2010 Sep 03, 2010

Hi, I need to set margins to a different value, and my line doesn't work:

myDoc.marginPreferences(MarginPreference.bottom =".125 in");

Thank you very much.

Yulia

TOPICS
Scripting
1.2K
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

Engaged , Sep 03, 2010 Sep 03, 2010

Its working on InDesign CS5 MAC here.

Can you try with this

var myDoc = app.activeDocument;
for (var a=0; a<myDoc.pages.length; a++)
{
myDoc.pages.marginPreferences.bottom = ".125 in";
}

Shonky

Translate
Engaged ,
Sep 03, 2010 Sep 03, 2010

If you want change bottom margin  of your spread then you this code

myDoc.masterSpreads[0].pages[0].marginPreferences.bottom = ".125 in";
myDoc.masterSpreads[0].pages[1].marginPreferences.bottom = ".125 in";

MarginPreference is a property of pages and you using with document.

Shonky

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
Participant ,
Sep 03, 2010 Sep 03, 2010

It didn't work for me. It didn't give me errors on the first page, but didn't change the  margins, and it was interrupted on the 2nd page.

Thank you for  your help.

Yulia

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
Engaged ,
Sep 03, 2010 Sep 03, 2010

Its working on InDesign CS5 MAC here.

Can you try with this

var myDoc = app.activeDocument;
for (var a=0; a<myDoc.pages.length; a++)
{
myDoc.pages.marginPreferences.bottom = ".125 in";
}

Shonky

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
Participant ,
Sep 03, 2010 Sep 03, 2010
LATEST

It worked.

Thank you.

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