Portable Document Format (PDF) is
defacto file format for presenting device-independent documents on and off
Web. While PDFs have become quite popular on
Web, many PDFs used in web sites are designed for high quality print output and are not optimized for
Web. Even PDFs designed for Web use can have a wait problem, weighed down with excess fonts, change histories, and unoptimized images and forms. Optimizing PDF files for
Web can significantly shrink their size and boost display speed, saving bandwidth and user frustration. (For
full “Optimize PDF Files for
Web” article, see http://www.websiteoptimization.com/speed/tweak/pdf/)Creating Small PDFs The main factors in creating small PDFs are image resolution, image type (bitmap or vector),
number of fonts used and how they are embedded, PDF version, and
level of compression. In general
higher
PDF version number,
smaller
file. Acrobat 5 (PDF version 1.4) added JBIG2 compression, which is superior to
CCITT or Zip algorithms when compressing scanned monochromatic copy.
JBIG2 (Joint Bilevel Image Experts Group) encoding compresses monochrome (1 bit per pixel) image data from 20:1 to 50:1 for pages full of text. Like other dictionary-based algorithms (LZW, ZIP) JBIG2 creates a table of unique symbols and when a subsequent symbol matches one in
table, it substitutes a token pointing to
table index. JBIG2 also compresses
entire table.
Acrobat 6 (PDF version 1.5) added
ability to compress
entire file (Clean Up Settings dialog). However, since over 90% of Acrobat users have version 5.0 or greater, using PDF 1.4 is a safer alternative. Acrobat will usually display (with a warning) a more recent PDF version, but new compression schemes will spawn an error when opened in older versions of Acrobat. At
time of this writing, Adobe says that of those 90%, 50% use version 5 and 40% use version 6.
To create
smallest possible PDFs file size for
Web minimize
number of fonts, bitmapped images, and substitute vector based-graphics instead. Minimize
number and complexity of forms in your PDF document, and avoid
use of multimedia.
There are different methods to create PDFs, including outputting to PostScript and Distilling, GDI/Printing, one-click "Direct to PDF," and dynamically on
server-side. However you create a PDF,
techniques and tools listed below can help you enhance and optimize your PDFs for
Web.
Avoid Refried Graphics For graphics that must be inserted as bitmaps, prepare them for maximum compressibility and minimum dimensions. Use
best quality images that you can at
output resolution of
PDF. Inserting compressed JPEGs into PDFs and Distilling them may recompress JPEGs, which can create noticeable artifacts. Use black and white images and text instead of color images to allow
use of
newer JBIG2 standard that excels in monochromatic compression. Be sure to turn off thumbnails when saving PDFs for
Web.