This tutorial was requested (by David) and I'm happy to report, it's really not very hard to do. If you've ever used a clipping mask to hide all of the extra artwork that hangs off the edges of your Illustrator artboard, and wished you could just get rid of the excess, here's how…
You can skip this step if you already know your document size, but in order to crop all of your excess artwork to the artboard, you need to know it's exact size. You can start with a fresh document and enter in your exact dimensions like below, or go to File > Document Setup to check the document size of an existing Illustrator file.
So you have something like the example below with some extra artwork hanging off the edges and you'd like to ‘get rid of the extra.'
With the Rectangle Tool, click once on the artboard to bring up the options, and type in the exact same dimensions as your Illustrator document size to create a rectangle that will match your artboard. Mine happens to be 350 X 350px.
You need to make sure your rectangle is on top of everything else. You can do this (with the rectangle selected) by hitting Command/Control + Shift + ], or Right Click on your rectangle and choose Arrange > Bring to Front. Note: If you have more than one layer, this shape must be in the top most layer, and on top of all other shapes.
Now you need to align the rectangle exactly to the artboard. To do this, open the Align Palette (Window > Align) and make sure “Align to Artboard” is checked. CS3 pictured below. CS2 and previous users: you'll find the “Align to Artboard” option by clicking on the palette options (the little arrow in the upper right corner of the palette).
Now, with your rectangle selected, click on these 2 buttons on the Align palette (in any order) to align your shape exactly to the artboard.
First make sure that nothing is locked by either looking in your Layers palette, going to Object > Unlock All, or the shortcut: Option + Command + 2 (Mac) Not sure about PC, commenters? Then do a “Select All” (Command/Contol + A, Select > All) or select everything with your mouse. So you should now see something like this, with your rectangle perfectly aligned to the artboard, everything selected, and the rectangle on the very top.
Open your Pathfinder palette (Window > Pathfinder) and, with everything still selected, hit this button. (the crop button).
You should now have no artwork outside of the document size after the crop. Gotta love the pathfinder 🙂
Final product with nothing selected:
For a non-destructive way to acheive a similar effect, I have a post on “Layer Masking” in Illustrator. It's not the same as a clipping mask, and It gives the same effect as this tutorial without deleting any artwork. Basically a clipping mask with more freedom.