Showing posts with label Document Setup. Show all posts
Showing posts with label Document Setup. Show all posts

March 12, 2008

Of document sizes and crop areas: A bedtime story about Save for Web & Devices

I've often seen questions about Illustrator CS3 and the Save for Web & Devices feature. One common question is, "Why do my colors look rich and vibrant in my Illustrator document, but less-than desirable in Save for Web?" I won't answer that question in this post (but it has to do with the fact that CS3 now defaults to using the sRGB color space when exporting from Save for Web), but I'd like to deal with yet another question that I see frequently.

You may find that at times, when trying to use Save for Web & Devices, you'll get an error dialog that says "The image exceeds the size Save for Web was designed for. You may experience out of memory errors and slow performance. Are you sure you want to continue?"



This "issue" is caused by some new behavior that was introduced in Illustrator CS3 around the implementation of document size settings and how crop areas work. Let's take a closer look inside, shall we? Then we'll see how easy it is to fix this little problem.

In a previous post, I spoke about some of the changes to the settings in Document Setup as they pertain to NDPs (New Document Profiles). Specifically for new documents created with the Web profile, it's important to realize that Illustrator creates a document size of 14400 x 14400 pixels in size, and creates a crop area at the size you specified in the dialog (i.e. 800x600). I also mentioned that the profile specified in the file's metadata "tells" Illustrator to honor the crop area size as the document size, so things like printing and zooming to fit in window function as one would expect.

But this really is an important concept to understand. If you create a new 800x600 Illustrator document, using the Web NDP, and you zoom out to like 4%, you'll see the huge document size, and the crop area in the center.



By default, the Save for Web & Devices feature uses your crop area as the boundary for your artwork. This is actually a great feature, as you can easily dial in a specific size for your web graphic and get exactly what you expect (without this, you can often get image sizes that are one pixel off, or have extra white lines, etc). With the new crop area functionality in Illustrator CS3, you can create multiple crop areas, making it easier to quickly export multiple web graphics from a single Illustrator document. For example, I often have several web banners set up in a single Illustrator file, with multiple crop areas defined for each banner (only one crop area can be active at any one time, though).

So to come full circle on all of this, when you create a document that is 800x600, a document size of 14400x14400 is created, a crop area of 800x600 is created, Illustrator considers the crop area as if it were really the document size, and when you export your artwork using Save for Web & Devices, the artwork is cropped exactly to your 800x600 crop area.

HOWEVER, there is a setting in Save for Web & Devices that can change all of this Well Thought Out Logic.

When you open Save for Web & Devices, there's a group of three panels on the far right, beneath all of the image format and optimization settings. These panels, Color Table, Image Size, and Layers, provide additional functionality, which can be very useful. But for the sake of this post, we'll focus on the Image Size panel.



In this panel, you can see the exact size of your final image and even change it. I often do this because Illustrator artwork is of course, scalable to any size. So if I need to create a graphic set to a specific size, I can do that MUCH faster here in the Image Size panel than actually resizing the art on my Illustrator artboard for each size I need. You can just dial in the settings (and remember to hit the Apply button). But there's also an all-important setting here -- a box labeled "Clip to Artboard". This setting, when checked, instructs Illustrator to ignore the crop area size in your document, and instead uses your document size as the final size for your web graphic. So going back to what we now know about how Illustrator sets up a Web document, let's see what this means.

Using the same settings in my example above, if you turn on the Clip to Artboard setting in the Image Size panel, you're telling Illustrator not to export an image of 800x600 pixels, but rather an image of 14400 x 14400 pixels. That's just "slightly" larger in size, right? Since web graphics are never that large, Save for Web was never designed to work with images at that size and hence, the error dialog appears. So if you're getting the error, it simply means that the Clip to Artboard setting is checked on. This could happen quite easily, because the settings in Save for Web & Devices are "sticky" -- meaning settings stay as you set them, even as you move from one document to another.

So the question is, how to fix this problem? Well, obviously, the solution is to open Save for Web & Devices, click on the Image Size panel, and uncheck the Clip to Artboard option. However, there are times when Save for Web & Devices won't even open, as it will close the window immediately after you dismiss the error dialog. The solution then is to first choose File > Document setup, and specify a much smaller Width and Height for your artboard (something like 1200x1200 for example). Once you do that, you'll be able to open the Save for Web & Devices feature without error, and you can then uncheck the Clip to Artboard option.

November 25, 2007

ASK MORDY: Document Size and Bleed

My good friend Marco from MacMojo.nl asked me this question:

We used to work with Creative suite 1. Now we're happy CS3 users but the Illustrator art with bleed does not show up anymore when I place it in InDesign. Of course I could open all the files and make the document extra large to include the bleed, but for the designers it's faster to just see if and where the bleed is. Would you happen to know if there's a 'fast fix' for this?

This question actually opens up a rather large can of worms. The answer involves a bug that's currently in Illustrator.

As I always do when I teach, it helps to understand the underlying principles before trying to arrive at a solution. The journey is longer, but far more important as we pick up useful information along the way.

I'll start off first by pointing you to a rather famous post I wrote nearly two years ago entitled EPS is Dead to Me (or is it?)... which dealt with some of the important concepts you need to be familiar with when talking about this subject of document size and bleed.

To summarize:

- When you save a file out of Illustrator as a native .ai file (which is what the folks at Adobe tell you to do when you want to place files from Illustrator into InDesign), there's a checkbox called "Create PDF Compatible File" which is on by default. Basically, Illustrator creates a composite PDF of your document and includes it within your native Illustrator file. When you place your AI file into InDesign, InDesign reads and places the PDF file that's embedded within the AI file.

- A PDF file has five different "box" attributes that define the boundaries of any page. These boxes are:
ArtBox. Also called the bounding box, this area is defined by the art that appears in the document.
TrimBox. This area is defined by the Illustrator artboard and is the size you specify when creating a new document.
CropBox. This area is defined by using the Object > Crop Area > Make command in Illustrator.
BleedBox. This area is defined by the Bleed setting you define in the Save As PDF dialog and extends beyond the TrimBox area.
MediaBox. This area is defined by the size of the page on which you choose to print your file (is usually determined by the printer, not Illustrator).



If you want to view these boxes individually for any PDF file (although be aware that not all PDF files necessarily have all boxes defined), open the PDF in Acrobat Professional and choose Advanced > Print Production > Crop Pages. Then uncheck the Show All Boxes option, choose a Box from the popup menu and look at the preview.



You can also choose the Show Art, Trim, & Bleed Boxes option in the Page Display settings in Acrobat Preferences.

Now that we understand this, we can move on to the problem. Illustrator does a few things that make things difficult for us:

- Illustrator requires that objects be on the Illustrator Artboard (found in Document Setup or when you first create a file) in order for those objects to be visible on a printout or when placed into another application via the PDF format. This is not the case for files saved as EPS. If you understand the concept of what TrimBox is, this would seem to make sense. However, the ArtBox should reveal these objects -- at least according to my understanding of the setting.

- Illustrator will clip any object that falls outside the Artboard area. Meaning if an object is partially on the artboard and partially on the pasteboard, the result will be clipped so only the part that is on the artboard will be visible in the PDF. Again, this is not the case for EPS. Again, if you understand the concept of what TrimBox is, this would seem to make sense. However, the ArtBox should reveal these objects -- at least according to my understanding of the setting.

- Illustrator has no way to define a BleedBox for the PDF portion of a native Illustrator file. This means you can't properly define a TrimBox (or document size) and then allow for a bleed -- because you can't define a BleedBox. So you're forced to create your TrimBox (the Document Size) at your BLEED size. Otherwise, the bleed will ALWAYS be clipped. Until the folks at Adobe give us the ability to define a bleed area for the artboard WITHIN Illustrator (much like the way InDesign allows you to define a bleed area in Document Setup), you'll have to use the workaround you've already mentioned in your question -- which is to enlarge your artboard (effectively increasing the TrimBox size).

- Illustrator has a bug in that it incorrectly sets the ArtBox to match the artboard size -- in other words, the TrimBox. In reality, the ArtBox should be your savior here -- if you had a way to place the ArtBox into InDesign, you'd be able to see even the art that appears off the artboard. Instead, the bug clips the art at the artboard because it uses the TrimBox setting. This bug has been present in Illustrator CS2 and now in Illustrator CS3 as well.

Great, so now that we're aware of the problem, what's the solution?

The solution is to save your file as a PDF file, not as an .ai file. Because when you save your file as a PDF, you have the ability to define a BleedBox. Choose File > Save As and choose Adobe PDF as the File Format. Then, in the PDF Options dialog, go to the Marks and Bleeds panel and define a Bleed area. In this way, your PDF file will contain a TrimBox (granted, the ArtBox will be the same size as the TrimBox due to the bug), but it will also include a BleedBox which will include objects that appear outside the artboard area granted those objects are at least partially on the artboard. If you keep the option "Preserve Illustrator Editing Capabilities" on when saving the PDF, you'll get a full native AI file within the PDF, allowing you reopen and fully edit the PDF in AI when necessary (it's basically the exact same thing as a native .ai file, but in reverse). The downside is that should you use Edit Original from InDesign to edit the file, the file will open in Acrobat, not Illustrator. So you'll need to manually open the file in AI to edit it.

When placing your Illustrator files into InDesign, check Show Import Options when placing your file (or better, just hold the Shift key while clicking the Place button in the Place dialog). You can then choose exactly WHICH PDF Box you want InDesign to use when placing your file. The preview can help you make sure you choose the right one. But obviously, in our case, you want to choose the Bleed option.



Moving forward, for all new files, I'm finding myself more and more moving away from the artboard size as being anything meaningful at all. Kind of the way Illustrator now creates a single huge artboard for Web documents (see this post for details), I do the same for print documents by creating an extremely large artboard, and I then use Crop Areas to define my document. In this way, I can toggle between the CropBox and BoundingBox place settings in InDesign to get what I want.

Naturally, I hope that Adobe realizes what a problem this is and that they fix all the bounding box issues with Illustrator and add a true bleed setting for CS4. If you think this issue is important to you and you share my concerns and hopes for this to be addressed in CS4, please sound off in the comments -- let this serve as a powerful petition to Adobe to fix this. Heck, fixing the ArtBox bug with a dot release in CS3 would be TOTALLY awesome as well.

Woz, I apologize for the long post, but I hope this gives you your answer (maybe not the one you were hoping for, but an answer nonetheless).