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

Shrink Artboard to fit content

New Here ,
Jul 04, 2008 Jul 04, 2008

Copy link to clipboard

Copied

I've been searching everywhere for a script or plugin that will shrink the artboard to fit the content. Fireworks has a feature like that. Has anyone done this in Illustrator?

Views

67.7K

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
Advocate ,
Jul 04, 2008 Jul 04, 2008

Copy link to clipboard

Copied

Why would you want to shrink the artboard? Are you sure you don't mean the pagesize?

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
New Here ,
Jul 05, 2008 Jul 05, 2008

Copy link to clipboard

Copied

I think Artboard and Pagesize is the same thing.

In the [View] menu there is a [Show/Hide Artboard] command, that's the one I want to shrink/resize. Right now I do it manually. First I select all the objects in the document. Then I go to [File>Document Setup...] and change the width and hight under 'Artboard Setup' by copying the values from the Transform panel. I'm trying to automate this process with a 'Shrink to Fit' command, but couldn't find one.

The reason I want to do this, is so the file thumbnails/previews in Adobe Bridge and other Viewers show only the content without all the white space around it which makes the content very small to see sometimes.

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
Advocate ,
Jul 05, 2008 Jul 05, 2008

Copy link to clipboard

Copied

From the Help files for Illustrator CS3:

The printable area is bounded by the innermost dotted lines and represents the portion of the page on which the selected printer can print. Many printers cannot print to the edge of the paper.

The nonprintable area is between the two sets of dotted lines representing any nonprintable margin of the page.

The page edge is indicated by the outermost set of dotted lines.

The artboard is bounded by solid lines and represents the maximum printable area. To hide the artboard boundaries, choose View > Hide Artboard.

The scratch area is the area outside the artboard that extends to the edge of the 227‑inch square window. The scratch area represents a space on which you can create, edit, and store elements of artwork before moving them onto the artboard. Objects placed onto the scratch area are visible on‑screen, but they do not print.

----

From that follows that if you change the pagesize you also change the size of the artboard. Semantics maybe, but if you make a huge artboard you can actually tile multiple pages - sizes of which are set by those of your paper size for printing - inside that artboard. You can also make an artboard that is smaller than the papersize if you so choose and by moving the page-outline with the pagetool decide what part of the page to print.

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
New Here ,
Aug 12, 2008 Aug 12, 2008

Copy link to clipboard

Copied

Nini, you're missing the point here. What Hakoon wants, and myself also, is a plugin or script with which you can have illustrator automatically snap the size of the artboard to the bounding box of the artwork you load.
I would like something like this very much too, since I have to import and then edit loads and loads of technical drawings, that are sent to me as WMF's. (since wmf is the only fileformat we found that the 3D-designers software can output and that I can import in illustrator without problems, we tried all other options, please don't suggest I try another format, thx)
The ONLY problem is, that when I open such a WMF, the artboard is always set to240x120mm...
So, I have to manually set the artboard to the bounding-box size of the artwork... A tool that would automate this would be VERY helpful!

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
LEGEND ,
Aug 12, 2008 Aug 12, 2008

Copy link to clipboard

Copied

> What Hakoon wants, and myself also, is a plugin or script with which you can have illustrator automatically snap the size of the artboard to the bounding box of the artwork...

As for scripting: The AI scripting model provides read-only access to the current document Artboard size.

JET

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
New Here ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

I see what the first poster is talking about. Viewing AI files in Bridge really sucks because none of the scratch area shows up in Bridge's thumbnail preview. If either there was a way to change the artboard size to match the document objects boundary, or a way in Bridge to customize the viewing extents of the thumbnails to include the scratch areas of AI files, then that would be awesome.

As it stands, you can do neither. Viewing scratch areas in the thumbnails in Bridge would make Bridge immensely more useful.

-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
LEGEND ,
Oct 20, 2008 Oct 20, 2008

Copy link to clipboard

Copied

An automatic shrink (or snap) artboard to fit content would be extremely useful.

With the advent of AI 10, Illy suddenly got fussy about the artboard size. Prior to that it didn't make much difference what the size of the artboard was. But now that output is controlled via Print, making a cropped pdf straight from Illy requires the artboard size to be exactly right, so a shortcut would be most welcome.

Saving Illy files as EPS and then using Distiller alleviates the problem but that artboard thing is still a nuisance.

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
Engaged ,
Oct 20, 2008 Oct 20, 2008

Copy link to clipboard

Copied

You have this feature in AI CS4 - fit an artboard to artwork bounds or to selected art.

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
Contributor ,
Oct 20, 2008 Oct 20, 2008

Copy link to clipboard

Copied

Yu do I thought it was in CS 3 as well I guess that is not so.

Did anyone double click the artboard tool to see if there is this option in CS3?

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
Guest
Oct 21, 2008 Oct 21, 2008

Copy link to clipboard

Copied

Is there even an artboard tool in CS3? Do you mean the crop tool, Wade?

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
Contributor ,
Oct 21, 2008 Oct 21, 2008

Copy link to clipboard

Copied

Is that what they called it?

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
LEGEND ,
Oct 22, 2008 Oct 22, 2008

Copy link to clipboard

Copied

In CS3 and prior, Illustrator's Artboard is not moveable from the center of the pasteboard. So if your artwork is not centered, setting the Artboard size to the size of the content of your file would not likely do what you want.

The scripting model does not provide access to the Artboard size. It is read-only. When scripters need to resize an Artboard, they resort to workarounds involving creation of a new document.

JET

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
Explorer ,
Oct 25, 2008 Oct 25, 2008

Copy link to clipboard

Copied

In AI CS4, artboards are movable and resizable; they can be forced to snap to artwork bounds or the bounds of just the selected art.

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
New Here ,
Mar 05, 2009 Mar 05, 2009

Copy link to clipboard

Copied

I understand how to re size the art board in AI CS4 (fit to art work bounds). I'd like to run an action on this art board feature.

Basically I want to run a re size (say all images down to a constrained 5" width) on my image and bring the art board down with it using an action. Of course I have like 300 to do so I'd like to batch all the work.

I can "action" a re size but it won't record my "action" of the art board "fit to art work bounds".

Ideas?

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
New Here ,
May 29, 2009 May 29, 2009

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.

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
New Here ,
May 03, 2011 May 03, 2011

Copy link to clipboard

Copied

Me too, me too!!!!

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 ,
May 04, 2011 May 04, 2011

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");

    }

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
Guide ,
May 04, 2011 May 04, 2011

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?

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
New Here ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

Thanks for the suggestions, I'll look into these.

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
New Here ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

Out of the blue!!! Thank you! I'll bug my boss about upgrading to CS5.

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 ,
May 04, 2011 May 04, 2011

Copy link to clipboard

Copied

you're welcome

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 Beginner ,
Jun 07, 2011 Jun 07, 2011

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?

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
Advisor ,
Jun 07, 2011 Jun 07, 2011

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();

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 ,
Jun 07, 2011 Jun 07, 2011

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.

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