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.
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 folder
but I was able to save it elsewhere and move it there.
Peter
Copy link to clipboard
Copied
That’s another workaround... thanks!
Copy link to clipboard
Copied
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
);
}