Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Right, yes there is this functionality in CS4 - what the OP, myself, and many others want is a way to make it more automatic - like a keyboard shortcut to snap the artboard to selected art, all art, or what have you. If it's in Fireworks, why not have it in Illustrator. At least, if nto a shortcut, a way to script it, or put it in an action would be nice.
Copy link to clipboard
Copied
Me too, me too!!!!
Copy link to clipboard
Copied
wow, such an old post, all the OP and others requests are now possible with CS5.
here you go, for you and other CS4 users
#target Illustrator
// script.name = shrinkABtoFitArt_CS4.jsx;
// script.description = resizes active artboard to fit the the Art (+ margins);
// script.required = one document with at least one piece of art;
// script.parent = carlos canto // 5/3/11;
// script.elegant = false;
if (app.documents.length > 0)
{
//alert("more than 0");
var idoc = app.activeDocument;
var pageItemsCount = idoc.pageItems.length;
if (pageItemsCount>=1)
{
var msg = "Enter Artboard Margins \n";
msg += "\nEnter negative numbers to cancel";
var margins = Number(Window.prompt (msg, 10, "CS4 Shrink Arboard to Fit"));
if (margins>=0)
{
var activeABindex = idoc.artboards.getActiveArtboardIndex();
var newAB = idoc.artboards[activeABindex];
var iartBounds = idoc.visibleBounds;
var ableft = iartBounds[0]-margins;
var abtop = iartBounds[1]+margins;
var abright = iartBounds[2]+margins;
var abbottom = iartBounds[3]-margins;
newAB.artboardRect = [ableft, abtop, abright, abbottom];
var myZoom = idoc.activeView.zoom;
idoc.activeView.zoom = myZoom+.01;
idoc.activeView.zoom = myZoom;
}
else
{
alert("nos vamos");
}
}
else
{
alert("there is no art in the active document");
}
}
else
{
alert ("there are no open documents");
}
Copy link to clipboard
Copied
I never had CS4 but Illustrator has options for opening files and handling artboards…
convertCropAreaToArboard
convertTilesToArboard
createArtboardWithArtworkBoundingBox // This may be what you want?
preserveLegacyArtboard
You could batch script opening files… even script it to work from bridge as input… I don't use actions so I don't know it these options are available when recording some open file in AI?
Copy link to clipboard
Copied
Thanks for the suggestions, I'll look into these.
Copy link to clipboard
Copied
Out of the blue!!! Thank you! I'll bug my boss about upgrading to CS5.
Copy link to clipboard
Copied
you're welcome
Copy link to clipboard
Copied
CarlosCanto wrote:
wow, such an old post, all the OP and others requests are now possible with CS5.
Sorry Carlos, I have CS5 (and CS5.1) and I'm still unable to record the changing of the artboard size as an Illustrator action. Could you explain how to do this in CS5 please?
Copy link to clipboard
Copied
#target illustrator
function fitArtboards() {
if (app.documents.length == 0) {
alert('Open a document before running this script');
return;
} else {
for (var i = 0; i < documents.length; i++ ) {
app.activeDocument = documents;
app.activeDocument.artboards[0].artboardRect = app.activeDocument.geometricBounds;
redraw();
}
}
}
fitArtboards();
Copy link to clipboard
Copied
Rhiannon Miller wrote:
CarlosCanto wrote:
wow, such an old post, all the OP and others requests are now possible with CS5.
Sorry Carlos, I have CS5 (and CS5.1) and I'm still unable to record the changing of the artboard size as an Illustrator action. Could you explain how to do this in CS5 please?
Hi Rhiannon, sorry for the confusion, I didn't mean you could record an action in CS5, I meant you could do it manually in CS5.
I'll give it try tomorrow, I have CS5 at work. I'll let you know.