Drop 20 Pounds with InDesign
This article originally appeared in InDesign Magazine #39, December 2010/January 2011. Subscribe now!
Cruft: Something unpleasant that accumulates over time. Unproductive, wasteful, doesn't add value, obsolete, redundant.
InDesign documents can get needlessly heavy, slowly accumulating visible and invisible cruft as you work on them. The longer the document, and the longer you work on it, the more likely it is to become crufty and laden with excess. While there is nothing inherently bad about these files, we believe that they can lead to corruption (where the documents can "go bad"), confusion (where you may lose track of what's in your documents and how you created them), and a general slow-down of productivity.
Similarly, the files you print or export (such as PDFs and SWFs) may be far larger than they need to be, leading to long upload/download times, print times, and frustrated viewers. Fortunately, you can reduce the file sizes of both your InDesign documents and the files you export in some simple ways.
Click the image below to read the article as a PDF, or continue to read the article as HTML:
What Makes an INDD
Let's start by taking a look at what makes up an InDesign file. InDesign files are technically database files, which enables InDesign to do a lot of clever things, like unlimited undos and crash recovery. However, all databases have a certain amount of overhead—like an infrastructure that takes up room all by itself.
If you create a new blank document and save it without making any changes, it will be about 1 MB. That's without any content, just the basic document structure made up of the four S's: spreads, styles, swatches, and settings. The majority of that is the document's ICC CMYK profile, which takes up about 700K.
Then, as you work with the document, you'll see the file size grow each time you save it. This makes sense: As you add text, place graphics, and create new objects, you're adding information that has to be housed in the file. But what may not make as much sense is that when you remove content from the file, it does not shrink in size.
You can try this little experiment in cruft-creation yourself. Create an empty document. Save and note the file size. Now place a photo. Again save and note the file size. Now delete the photo. Although the document appears to be back to its original, empty state, if you save and check the file size you'll see it's just as big (actually slightly bigger) than when the photo was placed in the file! What gives? The ghost of the photo still haunts the file, lurking in the digital darkness! What you deleted was the rectangle that contained the photo. So it no longer appears on the page. But all the other information regarding that photo, including the proxy image and XMP metadata is apparently still there. That, dear friends, is cruft.
The worst thing you can do in terms of creating cruft is to copy and paste (or drag and drop) raster image content directly from Photoshop or a Web browser. You can instantly supersize an InDesign file by doing this. If you open a JPEG from your 10-megapixel camera in Photoshop, copy the whole thing with the selection tool, and paste the pixels into InDesign, that document immediately swells by 32 MB, which won't disappear even if you delete the picture!
One file we worked with was 95 MB large, due to five images that had been pasted in from Photoshop (Figure 1). Deleting the images didn't make a difference, but when we recreated the file, importing the images using File > Place instead of copy/paste, the INDD file size was only 2.2MB!
Figure 1: How can this empty one-page document possibly take up 95 MB on disk (left)? The answer: cruft! After a Save As, it's down to a manageable size (right).
Fortunately, text doesn't get trapped in the same way that image data does. When you delete text, it's gone for good, unless Track Changes is on. Likewise, increasing the size of pages or the pasteboard does not increase the file size.
The easiest way to de-cruft an InDesign document is to use the Save As command. By choosing File > Save As you can create a duplicate of your document that is cleansed of most of the accumulated cruft. Hidden, leftover data from deleted images is not included in the new file. Not only will you save disk space, you'll save time too, with faster file transfers and peppier performance overall.
Technically, the Save As trick creates a new file. If you use the same name, it deletes the bloated oldie, replacing it with this new slim one.
There are other methods for reducing unwanted build-up, but at this point you need to ask how badly you want smaller, more efficient files. If you have a legitimate need to squeeze every last kilobyte of extraneous data out of your files, there's a lot you can do to trim the fat. But if you have ample disk space, you're not hampered by slow files, and you don't suffer from OCDD (Obsessive Compulsive Decrufting Disorder) it's probably not worth the time and effort to go beyond the occasional Save As.
That said, here are some steps you can take to reduce InDesign file size, in descending order of impact.
Resize Graphics. Because InDesign generally creates 72 ppi previews of your placed images, at 100% size, it behooves you to properly size those images before you place them into your layout. For example, say you have a little 1350 × 900 pixel photograph that you want to be 4" × 6" in a print layout. If you leave the image set to 72 ppi when you place it, then resize it in InDesign, your document will become about 600K larger. If, instead, you resize it to 4" × 6" in Photoshop's Image Size dialog box—with the Resample checkbox disabled, so that it's increasing the resolution, but not adding or removing pixels—then place it in InDesign, your file will only grow by about 360K (Figure 2).
Figure 2: This 72 ppi image from a digital camera is almost 15 MB (top) and could fatten your InDesign file unnecessarily. Reduce the pixel dimensions to just the amount you need, and increase the resolution before placing it in InDesign (bottom).
These two documents will produce identical output, but one is 240k larger because the previews InDesign creates match the document size specified in Photoshop. So InDesign creates a preview that's 18.75" × 12.5" for the 72 ppi image, but only a small 6" × 4" preview for the 225 ppi image.
In fact, placing images at 72 ppi has the same net effect as embedding them, since the embedded preview is the same size and resolution as the image itself!
The moral of the story is to properly size images before placing them into InDesign. Sizing images after placing them has no effect, since the previews have already been added to the document.
If you're creating interactive documents, your images rarely need to be more than 150 ppi. For most print usage, using 225 ppi resolution images will produce excellent results while saving a significant amount of file size. (The old rule of 300 ppi is wasteful and inefficient. For example, a 4" × 6" raster image at 600 ppi is 24.7 MB. Downsample that to 300 ppi and the file size drops to almost 7 MB. Not bad, but 225 ppi is only 3.5 MB, with rarely a drop in image quality in most cases.)
Export as IDML. When you export as IDML (or INX, if you're still using version CS3), InDesign creates an XML-based representation of your InDesign document, like dehydrating a slab of juicy meat into jerky. (That's a vast oversimplification, but it'll do.) You can then open that IDML file and InDesign reconstitutes it—literally rebuilding a new document that looks exactly like the old one. This not only removes garden-variety cruft, it also strips missing plug-in data and other ickyness that may have crept in along the document's history. The IDML "roundtrip" process makes your file even sleeker and less prone to be sluggish and buggish.
You might know that if you open an INX or IDML file when you don't have access to the graphics that were placed in the original InDesign file you see gray boxes instead of previews of the graphics. This is because image previews (or proxies) are not included in the INX or IDML. InDesign generates fresh previews when it creates a new file. But did you know you can use this phenomenon to your advantage? If you're sending a file to someone else to work on and that person does not need to see the image previews, you can send them an INX or IDML and not the graphics. A document with a long history and lots of placed high-res graphics can consume many megabytes of disk space. But you can ditch up to 99% of that file size via IDML export, making it easily small enough to attach to an email or IM. Then when you don't mind the increased file size, just make the art available to InDesign and update the links.
Disable Image Previews. Every time you save a file in InDesign, the program generates one or more page previews, so that you can see what the file looks like in Bridge. However, including image previews has the same effect as embedding graphics in your document—it can balloon the file size, especially if you chose to include large previews of all pages! But what if you don't use the Preview feature in Bridge? You can trim a little off the sides by opening the Preferences dialog box in InDesign, choosing the File Handling pane, and disabling the option called Always Save Image Previews with Documents (Figure 3). Alternatively, leave that on, but reduce the number of pages and/or preview size settings. Note that changing the preference won't have an immediate effect on existing documents; page preview bloat can only be fully eliminated with the Save As command.
Figure 3: Be conservative when telling InDesign to save image previews unless you really make use of them in Bridge.
Delete Unused Document Stuff. Part of being trim is actually losing weight; another part is dressing trim! So just as you wouldn't wear wide horizontal striped outfits, you want to remove the appearance of cruft: extra styles, extra frames, etc. You look neater, so you feel neater, and people see you as neater and more efficient.
In the case of InDesign, "dressing trim," means trimming out anything that is unused in the document. Get rid of all extraneous styles (paragraph and character styles, TOC styles, table and cell styles, and object styles), delete unused swatches, master pages, empty document pages, pasteboard junk, unused layers, XML tags and elements not attached to the layout, unused text variables, text conditions, hyperlinks, cross-references, notes, tracked changes, and InCopy assignments. In short, toss everything that isn't bolted down.
Note that when we say "unused," we really mean "stuff that isn't going to get used." You know, like the eight master pages and fifteen color swatches you made "just in case." For example, you can choose Select All Unused from the Character Styles panel menu, then click the Delete button to remove them.
You can also use InDesign's Preflight panel to find some extraneous items that are bloating your files. For example, you could make a custom preflight profile that finds blank pages. The Quality Assurance panel (part of the Blatner Tools suite of plug-ins; see the review in the February/March 2010 issue of InDesign Magazine (#34). can also find a wide array of extra stuff, including empty frames, frames hidden behind other frames, objects on the pasteboard, and more.
Avoid Overriding. You can have a master page object show up on 1,000 document pages and it's only counted as one object in the INDD database. But if you override that object on a master page, InDesign sees it as a separate object and it adds a little to the file size. If you have to override a master page object, then go for it, but don't use override until you have a reason to do so. It doesn't make a huge difference, but it's all part of dressing trim.
An InDesign file is only a means to an end. It serves to structure and format content, but other file formats like PDF and SWF are actually used to deliver content to print or screen. So the size of files exported from InDesign are just as important if not more so than the size of the file that spawned them. Granted, the size of a PDF file that you're sending to a printer for output may not matter a lot, but one that you're putting on a web site for download can be make-or-break for whether your audience reads it.
Reducing PDF File Size. The easiest way to reduce the size of PDFs exported from InDesign is to make prudent use of the Export Adobe PDF settings. These options offer you a wealth of controls for choosing what's included in a PDF (and what's left behind in InDesign). You can optimize your PDF file size by preserving transparency, downsampling images to the resolution you need, converting unneeded spot colors to your destination color space, and always subsetting fonts.
Note that this means that you may have to stray from the beaten path of the PDF presets, or make your own. For example, let's say you're putting a newsletter on your website for people to output themselves on desktop printers. The PDF/X-3 preset is a pretty good starting point for this, but you can maintain most of the quality you want and reduce the file size significantly by lowering the Image Quality pop-up menus (in the Compression pane of the Export PDF dialog box) to High, or even Medium, and changing all the "pixels per inch" fields to 150 (Figure 4). Then increase the Compatibility pop-up menu to Acrobat 6 or higher, so that transparency won't get flattened. (Transparency flattening can add a lot to PDF file size.)
Figure 4: If your document is destined for printing on home laser printers or inkjets, reduce the resolution and JPEG quality to bring down the file size!
One thing to keep in mind: If you're trying to make a small PDF, make sure that your CMYK profiles aren't included. As we said earlier, those can really bulk up a file. In general, that means choosing Don't Include Profiles from the Profile Inclusion Policy pop-up menu (in the Output pane of the Export PDF dialog box). For example, that one change may mean the difference between a 1MB file or a 50K file (Figure 5). Of course, discarding the profile means that your audience may not be able to see or print the color accurately, but hey, if it's a one- or two-color brochure or form, do you really care?
Figure 5: The difference between including and not including color profiles is the difference between a PDF file that is 500K and 10K. Which one will your readers like more?
If you have Acrobat Professional, you have even more tools for reducing PDF file size. You can make use of the Distiller application to create PDFs instead of exporting them directly from InDesign. Distiller tends to make smaller PDFs than InDesign does—even smaller than InDesign's [Smallest File Size] preset. But what you save in file size, you pay for in loss of convenience, since it takes longer to export a PostScript file (from the Print dialog box) and then distill it into a PDF than it does to simply export a PDF directly from InDesign. You also lose all interactivity (hyperlinks and bookmarks, for example) and transparency is always flattened.
Perhaps the best way to slim down your PDF files is to export directly from InDesign, and then use Acrobat Pro to reduce its size. The quick and dirty method is to simply choose Document > Reduce File Size. However, this doesn't offer you much control in how the size is reduced (i.e., you don't get to choose what data you are willing to throw away). A much better approach is to use the PDF Optimizer command, found in the Advanced menu (Figure 6). It lets you first audit the PDF to see exactly how much each part of the document adds to the file size. Armed with this information, you can then intelligently downsample images, unembed fonts, and discard other data till your PDF is as slim as you need it to be. As an added convenience, you can save your settings to re-use them on the next portly PDF that comes your way.
Figure 6: Acrobat Pro's Optimizer feature can reduce a PDF significantly. If you need even more reduction and control, consider a third-party utility, such as PDFshrink from Apago.
Reducing SWF File Size. When it comes to exporting SWF files from InDesign, you don't have as many options as PDF. You can make the SWFs a bit skinnier from InDesign by applying JPEG compression, limiting your frame rate to just what you need, and choosing Flash Classic Text. Avoid rasterizing pages and converting text to outlines, both of which can greatly increase the size of an exported SWF.
But here's the problem: InDesign always adds a bunch of extra stuff to your SWF files—like ActionScript routines that may or may not be required by the animations in the SWF. That's why no matter what you do, these SWF files are rarely small enough to be used for Web banner ads.
However we should note that, much like Acrobat can help you reduce the size of your PDFs, Flash Professional can put your SWFs on a diet. Instead of exporting SWFs directly from InDesign, you can export a FLA file and use Flash Pro's extensive Publish Settings to fine-tune your SWF output.
Converting a FLA from InDesign to a SWF ready to publish is unfortunately not the simplest task, and can often require some coding. But if it's a simple banner ad, you can often manage it without a developer looking over your shoulder.
Think Slim, Be Slim
In this age of multi-terabyte hard drives and the "you want fries with that?" mentality, it's sometimes hard to remember that efficiency is tethered to restraint. It takes a little work and attention to reducing file size—both in InDesign files and the files you export—but the results can be fabulous, from faster processing to a faster promotion at work!