Answered
Resize one page out of 2 page indesign with js
Hi,
I need to resize one out of 2 pages in Indesign with javascript. What would be the correct sintaks for it:
myDoc.pages[0].resizeIndividually (8.5,11);
Thank you
Yulia
Hi,
I need to resize one out of 2 pages in Indesign with javascript. What would be the correct sintaks for it:
myDoc.pages[0].resizeIndividually (8.5,11);
Thank you
Yulia
Oops that didn't work
Try this
var myDoc = app.activeDocument;
var myPage = myDoc.pages[0];
var newWidth = 8.5; // in inches
var newHeight = 11; // in inches
var widthScaleFactor = newWidth / myPage.bounds[3];
var heightScaleFactor = newHeight / myPage.bounds[2];
myPage.resize(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.TOP_LEFT_ANCHOR, ResizeMethods.MULTIPLYING_CURRENT_DIMENSIONS_BY, [widthScaleFactor, heightScaleFactor]);Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.