← Blog

TIFF to PDF — multi-page anatomy

A TIFF is a linked list of IFDs; each IFD becomes one PDF page Multi-page TIFF structure header · II/MM · magic 42 IFD 0 — Width, Height, Compression… strip / tile offsets → page 1 pixels IFD 1 — Width, Height, Compression… strip / tile offsets → page 2 pixels IFD 2 — Width, Height, Compression… strip / tile offsets → page 3 pixels Resulting PDF /Pages [ page 1: Image XObject ← IFD 0 page 2: Image XObject ← IFD 1 page 3: Image XObject ← IFD 2 ] One PDF page per TIFF IFD. Pixels are decompressed during the conversion and re-encoded with a PDF-native filter (typically /FlateDecode).

TIFF is a container format. Inside, an arbitrary number of images can sit side by side — typically pages of a scanned document, but also exposure brackets, animation frames, or thumbnail+main-image pairs. PDF's natural multi-page model maps directly onto this: one TIFF "page" (technically: one Image File Directory, or IFD) becomes one PDF page.

How TIFF organizes multiple images

A TIFF file starts with an 8-byte header indicating byte order ("II" for Intel/little-endian, "MM" for Motorola/big-endian) and the offset of the first IFD. An IFD is a tag-keyed dictionary of image properties (width, height, bit depth, compression, color space, ...) plus pointers to the actual pixel data (typically split into "strips" of consecutive scan lines). After the last tag, a 4-byte field gives the offset of the next IFD; if that offset is 0, the file ends.

This is a singly-linked list of images. To enumerate all images, walk the list. Each IFD describes a complete, independent image — possibly with different dimensions, compression, color depth from its siblings.

Why TIFF supports multi-page natively

TIFF was designed in 1986 for desktop scanning workflows. Office scanners often produce one document at a time, where a "document" is many pages. Saving one scan-session result into a single file required multi-page support. TIFF got it; JPEG and PNG did not (which is why they remain single-image only).

This makes TIFF the standard archival format for scanned documents to this day. Bank statements, government records, medical files, and corporate document management systems frequently use multi-page TIFF for receipt-grade durability.

What TIFF2PDF does

  1. Open the TIFF, walk the IFD chain, count pages.
  2. For each IFD, decode the relevant tags: width, height, compression, photometric interpretation, bit depth, samples per pixel, ICC profile if present.
  3. For each IFD, decode the pixel data and embed it into a PDF page. TIFF2PDF decodes the source pixels and re-encodes them on the PDF side — typically with Flate (zlib) compression.
  4. Concatenate page references in the output PDF's /Pages tree.

The result is a PDF whose page count matches the TIFF's IFD count, in IFD order.

Why people have multi-page TIFFs

Single-page TIFFs work too

A TIFF with one IFD is just a regular image, no different in capability from a JPEG or PNG. TIFF2PDF handles them the same way — extract the image, embed as a PDF page. Many cameras and imaging tools save individual high-quality TIFFs (often with LZW compression for lossless storage); these become single-page PDFs.

When TIFF is the wrong format

TIFF was never standardized as carefully as JPEG or PNG. The format has hundreds of optional features, custom tags, and vendor-specific extensions. Some real-world TIFFs in archives use:

TIFF2PDF handles common compression types (none / packbits / LZW / deflate / CCITT G3 / G4 / JPEG) and standard photometric interpretations (white-is-zero, black-is-zero, RGB, palette, separated CMYK, transparency mask). For unsupported variants the file is rejected with an explanation.

Page size and DPI

A TIFF can carry a DPI in its XResolution and YResolution tags. TIFF2PDF reads these and uses them to determine the PDF page size:

Most office-scanner TIFFs declare 300 DPI, so a Letter-sized scanned page (2550 × 3300 pixels) becomes a 612 × 792 pt PDF page — exactly Letter — and prints at the original physical size.