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

AdjustLayoutPreference Object Properties Not Working in InDesign 2025 & 2026 Scripts

Community Beginner ,
Jan 09, 2026 Jan 09, 2026

Hi All,

I am using Indesign 2025 and 2026; I would like to enable the "Adjust Layout" option in my documents through the Indesign scripting by using "AdjustLayoutPreference" object properties as in InDesign ExtendScript API, but Indesign throwed error is "Eval Error (#55): "Object does not support the property or method 'adjustLayoutPreferences'".

 

below is my code:

var myDocument = app.activeDocument;
try {
myDocument.layoutAdjustmentPreferences.enableLayoutAdjustment=true;
myDocument.layoutAdjustmentPreferences.allowGraphicsToResize=false;
myDocument.layoutAdjustmentPreferences.allowRulerGuidesToMove=false;
myDocument.layoutAdjustmentPreferences.ignoreObjectOrLayerLocks=true;
myDocument.layoutAdjustmentPreferences.ignoreRulerGuideAlignments=true;
myDocument.layoutAdjustmentPreferences.snapZone = 0;
} catch (error) {
myDocument.adjustLayoutPreferences.enableAutoAdjustMargins=true;
myDocument.adjustLayoutPreferences.enableAdjustLayout=true;
myDocument.adjustLayoutPreferences.allowLockedObjectsToAdjust=true;
myDocument.adjustLayoutPreferences.enableAdjustLayout=true;
}
 
Could someone please check and suggest, how to resolve this issue?
Regards,
Mani
 

 

TOPICS
Bug
107
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 ,
Jan 09, 2026 Jan 09, 2026

For starters, there's no layoutAdjustmentPreferences property, so you can discard that part already:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Document.html

 

I know you're getting the error in the catch part, but I'm not sure yet why.

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 ,
9 hours ago 9 hours ago

Hi @leo.r ,

well, indeed, according to the DOM documentation there are adjustLayoutPreferences:

https://www.indesignjs.de/extendscriptAPI/indesign21/#AdjustLayoutPreference.html

 

To make them work you first have to enable them:

myDocument.adjustLayoutPreferences.enableAdjustLayout = true;

Perhaps this is working as well:

 

myDocument.adjustLayoutPreferences.properties =
{
enableAdjustLayout : true,
enableAutoAdjustMargins : true,
allowLockedObjectsToAdjust : true
};

 

Kind regards,
Uwe Laubender
( Adobe Community Expert )

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 ,
8 hours ago 8 hours ago
LATEST

Thanks Uwe, I never got past Manid@SRMI ’s myDocument.layoutAdjustmentPreferences, which is not in the API.

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 ,
Jan 10, 2026 Jan 10, 2026

Hi Manid@SRMI , Is this an AI generated script? AI likes to make up methods.

 

Not sure if this helps, but there is an adjustLayout() method which handles some layout adjustments:

 

var doc = app.activeDocument;
//width and height parameters take points
doc.adjustLayout({width:800, height:800,leftMargin: 20, rightMargin: 20, topMargin: 20, bottomMargin: 20, bleedTop:30, bleedBottom:30, bleedInside:30, bleedOutside:30})

 

Before and after:

 

Screen Shot 9.png

 

Screen Shot 10.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