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

Create first artboard on top left of canvas. How?

Community Expert ,
Nov 27, 2019 Nov 27, 2019

Copy link to clipboard

Copied

When creating an illustrator document with a single artboard, the artboard is centered in the 227x227in big canvas. I would like to have the single artboard place top/left instead. Is there a way to achieve this on creating a document.

My workaround is to create a document with a 227 x 227 size artboard than reduze the size of it. 

TOPICS
Scripting

Views

1.1K

Translate

Translate

Report

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
Adobe
Community Expert ,
Nov 27, 2019 Nov 27, 2019

Copy link to clipboard

Copied

I don't know if this answers your need, Jean-Claude, but I created a document with a top-left artboard and saved it as a template. Illustrator did not let me save it in the Templates foldertop-left artboard.png

but I was able to save it elsewhere and move it there.

 

Peter

Votes

Translate

Translate

Report

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 ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

That’s another workaround... thanks!

Votes

Translate

Translate

Report

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 ,
Dec 01, 2019 Dec 01, 2019

Copy link to clipboard

Copied

LATEST

Here's a script to move your first artboard to top/left corner of pasteboard. You need to create your document as usual, then run the script to move the artboard. I could write a script to create the document with the artboard already moved, but there are too many options to set up a document that will take me a lot more effort to script.

 

thanks to OMOTI for creating a function to get top/left coordinates

 

// move artboard 0 to far Left/Top Corner of Pasteboard
// OMOTI / carlos canto 12/1/2019
// https://community.adobe.com/t5/illustrator/create-first-artboard-on-top-left-of-canvas-how/td-p/10767994

function main() {
    var idoc = app.activeDocument;
    

    var rect = getLargestBounds();  
    
    // repositon first artboard
    idoc.artboards[0].artboardRect = [rect[0], rect[1], rect[0]+idoc.width, rect[1]-idoc.height];
}

main();

function moveArtboardToLeftTopCorner() {
    
}

// get max paste board bounds
// OMOTI
// https://forums.adobe.com/thread/2459293

function getLargestBounds() {  
    var tempLayer,  
        tempText,  
        left,  
        top,  
        LARGEST_SIZE = 16383;  
    if (!app.documents.length) {  
        return;  
    }  
    tempLayer = app.activeDocument.layers.add();  
    tempText = tempLayer.textFrames.add();  
    left = tempText.matrix.mValueTX;  
    top = tempText.matrix.mValueTY;  
    tempLayer.remove();  
    return new Rect(  
        left,  
        top,  
        left + LARGEST_SIZE,  
        top + LARGEST_SIZE  
    );  
}  
   

 

 

Votes

Translate

Translate

Report

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