Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Resize Artboard to exact size : jscript

$
0
0

Hello

 

I'm trying to resize my artboard to an exact mm size via a script so then I can add this to a batch i'm trying to achieve.

 

I've been trying to use the following, but i cant work out how to add the size I want in mm?

 

Any help?

 

Thanks

 

#target illustrator

 

var doc = app.activeDocument;

 

var docVB = doc.visibleBounds;

    var myVisibleBounds = doc.visibleBounds; //Rect, which is an array;

    myVisibleBounds[0] -= 20; //left coordinate (use negative values to add artboard)

    myVisibleBounds[1] += 20; //ltop coordinate

    myVisibleBounds[2] += 20; //right coordinate

    myVisibleBounds[3] -= 20; //bottom coordinate (use negative values to add artboard)

    doc.artboards[0].artboardRect = myVisibleBounds;


Viewing all articles
Browse latest Browse all 12845

Trending Articles