You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#target Illustrator// script.name = ResizeArtboardsToContents.jsx;// script.description = resizes All artboards to the art present on themselves.// script.author= Herman van Boeijen, www.nimbling.com // 24/10/2013;if ( app.documents.length > 0 ) { doc = app.activeDocument; if(!doc.saved){ Window.alert("This script needs to modify your document. Please save it before running this script."); }}else{ Window.alert("You must open at least one document.");}function ResizeArtboardsToContents(doc){ //Get total amount of groups var TotalArtboards = doc.artboards.length;//iterate all Artboards for (var i = 0 ; i < TotalArtboards ; i++){ var CurrentArtboard = doc.artboards[i]; doc.artboards.setActiveArtboardIndex(i); //Select everything on artboard doc.selectObjectsOnActiveArtboard(i); //Resize artboard to selection doc.fitArtboardToSelectedArt(i); }}ResizeArtboardsToContents(doc);