Wednesday, July 06, 2005

Optimizing PDF Files

Many factors have contributed to the success of Adobe's PDF format. One key benefit is that you can put all kinds of content inside a PDF and know it won't get changed. Also, the content is accessible to almost everyone through the free Acrobat Reader.

But the format is not perfect, as anyone who encounters a huge, lumbering PDF file knows. It's tricky to reduce file size without diminishing the quality of your content. And the target user must be able to open your file.

You can make PDFs with a variety of tools, including most desktop publishing and graphics programs and some word processors. If your program doesn't output PDF files natively, you can buy Acrobat from Adobe or a host of third-party tools that present PDF creation as a driver you access like a printer. Whatever tool you use, three factors you should consider are file size, quality, and compatibility. Here are nine rules for optimizing your files.

Find a preset. Unless you're familiar with concepts like color space conversion, image resolution, and compression, you'll produce better results using an output preset in your content creation program. For example, Adobe InDesign has seven output presets ranging from Screen to Prepress, while the Acrobat Printer Properties window, accessed from programs like Microsoft Word, has presets like "High Quality" and "Smallest File Size." Experiment with the presets. If necessary, tweak them rather than starting from scratch.

Choose your output: screen or print. A critical decision in image-rich documents is the resolution of the images. Computer screens display images at 72 dpi, so images encoded at this resolution look perfect and can be very compact. By contrast, most printers output at 300 dpi or higher, so 72-dpi images will look grainy and blurry. If you output at 300 dpi, though, you'll greatly boost file size. (Our story "Prints and the Resolution," at go.pcmag.com/ printsresolution, shows why 300-dpi resolution may not be necessary.)

When you're optimizing PDFs for on-screen viewing, print them before distribution to assess quality. If high-quality print output is necessary, consider producing and posting two files, one for quick viewing and one for printing.

Compress just once. It's helpful to compress images for image-rich files. You can apply compression either when outputting from your content creation program or later within Acrobat itself. If you compress your images at both stages, however, you'll compound compression artifacts and degrade quality.

The best option is to produce your final PDF file with your content creation program, using either native controls or an Acrobat or third-party printer driver, and to skip reencoding within Acrobat. If that's not possible, you can output without compression from your content creation program and then compress to the final target in Acrobat.

Go grayscale. Using grayscale images rather than color can reduce file size by as much as 25 percent.

Use RGB for screens. When producing for screen-based displays, always output in RGB color rather than CMYK. You may achieve savings of 50 percent or more.

Find the fat before you cut. Acrobat's PDF Optimizer can perform a "Space Audit" that marks the components of the PDF file by size and percentage, so you can focus your file-size cutting efforts (click Advanced | PDF Optimizer, then the Audit Space Usage button). For hands-on users optimizing in Acrobat, this tool is the place to start.

Use common fonts. In text-intensive PDFs, embedded fonts can use lots of space. You can remove them, saving as much as 40KB per font. But if the viewer's system doesn't have them, Acrobat uses a substitute, which can lead to garbled results. If you need to save on file size, use only common fonts such as Arial and Times Roman, which you can safely leave out of the document.

Don't forget about compatibility. Adobe adds more advanced compression techniques to each version of Acrobat, producing ever-decreasing PDF file sizes, but readers then need the latest viewer to open the file. You can use Acrobat's File | Reduce File Size command to apply a later Acrobat version to your PDF file, but in a corporate setting with fixed configurations, choosing too recent a version can produce a document that no one is able to read.

Compress multimedia files before embedding. When embedding audio and video files into PDF documents, compress them beforehand to more compact, streaming formats like QuickTime or Microsoft Windows Media.

You can typically encode speech audio to around 48 Kbps without any obvious degradation, while music needs at least 96 Kbps. Video encoded at 300 to 400 Kbps at 320-by-240 resolution can look good, but below 200 Kbps quality gets dicey. Even at these stingy compression rates, file size adds up quickly, so mind your file size when adding multimedia content to your PDFs.

Using these tips, you should be able to greatly decrease the size of your PDF files, often without your readers noticing any difference in quality.


No comments: