Hack 48 Create a PDF Album of Your Digital Pictures

figs/moderate.gif figs/hack48.gif

Quickly prepare your photos to share with family and friends.

With a digital camera you can easily create hundreds of photographic images. Preparing these pictures to share with your family and friends is a more difficult task. Consider creating a photo album with PDF. It makes a clean package that you can easily distribute, and its thumbnails feature is ideal for rapid navigation.

Most importantly, you can quickly and easily create one, shown in Figure 4-18, with free software. ImageMagick can create a single PDF from a folder of photographs in a snap. Create a lightweight edition suitable for email by simply adding downsample and compression settings.

Figure 4-18. Collecting photos into a distributable package that is easy to navigate

4.18.1 Install ImageMagick

Visit http://www.imagemagick.org to learn about this powerful toolset and to download a Windows installer. The installer also unpacks documentation. We will use the convert tool, which is described in convert.html.

4.18.2 Convert Images to PDF

These examples use JPEG input images, but you can adapt them for use with other image types. Find a folder of images, open a command prompt [Hack #79] in this folder, and whisper this cantrip:

convert -density 100 -quality 85 \

-page "800x800>" -resize "800x800>" *.jpg album.pdf

When it is done, open album.pdf in Acrobat/Reader. Each image gets one PDF page, and they are ordered alphabetically by filename. To view all images with a uniform zoom, select View Actual Size. View the thumbnails by selecting View Navigation Tabs Pages (Acrobat 6) or Window Thumbnails (Acrobat 5). Select any image and copy it to the clipboard for use elsewhere; this works in Reader as well as Acrobat.

Let's take a look at our command parameters:


This is the resolution of output images measured in dots per inch (dpi). The default is 72 dpi. Changing it doesn't affect the resulting image quality. Rather, it affects the logical, outer dimensions of the image. For example, a 1600 1200-pixel image at 200 dpi is 8 6 inches. At 100 dpi it is 16 12 inches. I chose 100 dpi because it strikes a good balance between on-screen, Actual Size viewing and paper printing (150 dpi is good for printing photos on most 600 dpi printers).


This is the JPEG compression applied to the images as they are packed into the PDF. 0 yields the poorest image quality but the greatest compression. 100 yields the greatest image quality but the poorest compression. The default is 75.


This describes the outer dimensions of the PDF page, in pixels. If an image is smaller than these dimensions, the page is reduced to fit the image. Omitting this option causes large images to be constrained by (and squeezed into) the default, letter-page size. Set it to match the resize option.


This describes the maximum dimensions (in pixels) for all output images. The > symbol means that images smaller than this are not changed, and images larger than this are downsampled to fit. Decrease these dimensions to yield a smaller PDF file size. Increase these dimensions to improve image fidelity. Set page to match.

To demonstrate how these work together, here is another example. If your camera creates images at 1600 1200 pixels and you want to create a high-quality archive of these images, consider using:

convert -density 200 -quality 95 \

-page "1600x1600>" -resize "1600x1600>" *.jpg archive.pdf

4.18.3 Finishing Touches

In Acrobat you can correct image rotation, reorder images, and add bookmarks. I like to configure the PDF to open thumbnails automatically. See [Hack #62] for more information.

You can create similar PDF albums with Adobe Photoshop Album as well, though it costs around $50.