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

Resize Artboard

New Here ,
Feb 05, 2009 Feb 05, 2009
Unsure if Im asking in the right spot but is it possible to automate the resizing of the artboard say from A0 down to A1
TOPICS
Scripting
94.1K
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

Community Expert , Feb 05, 2009 Feb 05, 2009
No. Artboard size is created with the document and cannot be changed.

From the Scripting Reference:

A documents color space, height, and width can only be set when the document is created. You cannot modify these properties in an existing document.

You would have to create a new document at the right size and move everything to the new document.
Translate
Adobe
Explorer ,
Nov 22, 2013 Nov 22, 2013

#target illustrator

var doc = app.activeDocument;

var docVB = doc.visibleBounds;

var left = docVB[0] – (((docVB[2] - docVB[0])*1.1 - (docVB[2] - docVB[0])) / 2);

var top = docVB[1] + (((docVB[1] - docVB[3])*1.1 - (docVB[1] - docVB[3])) / 2);

var right = docVB[2] + (((docVB[2] - docVB[0])*1.1 - (docVB[2] - docVB[0])) / 2);

var bottom = docVB[3] - (((docVB[1] - docVB[3])*1.1 - (docVB[1] - docVB[3])) / 2);

var ab = doc.artboards.getActiveArtboardIndex();

doc.artboards[ab].artboardRect = [left,top,right,bottom];

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
Contributor ,
Sep 21, 2015 Sep 21, 2015

#target illustrator 

  

var doc = app.activeDocument; 

 

var docVB = doc.visibleBounds; 

 

var left = docVB[0] - 10; 

var top = docVB[1] + 10; 

var right = docVB[2] + 10; 

var bottom = docVB[3] - 10; 

 

var ab = doc.artboards.getActiveArtboardIndex(); 

 

doc.artboards[ab].artboardRect = [left,top,right,bottom]; 

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
New Here ,
Oct 21, 2023 Oct 21, 2023
LATEST

Yes, Shift+o.

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