Copy link to clipboard
Copied
Hi,
I create new doc. Can't set margins of new doc. Last line (code: margins) does not work ... wrong place I suppose, but can't find where else to set margins for whole doc (like I can do in: New Document / Document Preset.. see screenShot).
code:
var myDocument = app.documents.item(0);
with(myDocument.documentPreferences){
pageHeight = "430mm";
pageWidth = "266mm";
pageOrientation = PageOrientation.portrait;
pagesPerDocument = 12;
documentBleedTopOffset = "3mm";
documentBleedUniformSize = true;
facingPages = false;
intent = DocumentIntentOptions.PRINT_INTENT;
marginPreferences.properties= {top : 80,left: 80,right: 80,bottom: 80};
}
1 Correct answer
try marginPreferences property present on document, it has these option. Look at the following
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#MarginPreference.html
-Manan
Copy link to clipboard
Copied
try marginPreferences property present on document, it has these option. Look at the following
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#MarginPreference.html
-Manan
Copy link to clipboard
Copied
myDocument.marginPreferences.properties = {top : 80,left: 80,right: 80,bottom: 80};
marginPreferences is member of document object

