PDF Halftone

A PDF Halftone dictionary describes the screening parameters used to convert continuous-tone colour values into a pattern of dots or lines suitable for printing on a press that can only print solid ink. Halftone parameters include screen frequency, screen angle, dot shape, and an optional transfer function for dot gain compensation.

Halftone is a printing technique that reproduces continuous-tone images (like photographs) using patterns of discrete dots. Because most printing processes can only deposit a fixed amount of ink at any point (either ink is there or it isn't), the appearance of intermediate grey or colour values is created by varying the size and spacing of printed dots. Viewed at reading distance, the human eye merges the dots into the perception of a continuous tone.

In PDF, halftone dictionaries control how continuous-tone content is rendered to output devices that require halftoning — primarily PostScript printers, offset lithography presses, and digital presses. For screen display, halftoning is not used; viewers render using anti-aliasing instead. PDF halftone dictionaries are therefore primarily relevant for print production workflows.

PDF defines multiple halftone dictionary types (types 1, 5, 6, 10, and 16) for different use cases — from simple frequency/angle/spot function specifications to threshold array-based halftones used in direct digital printing workflows.

Halftone fundamentals: frequency, angle, and spot function

Traditional halftone screens are characterised by three parameters:

<strong>Frequency</strong> — The number of halftone cells per inch (lpi — lines per inch). Higher frequency produces finer detail but requires a higher-resolution printer. Typical values: 85 lpi for newsprint, 150 lpi for commercial offset, 200+ lpi for high-quality art printing.

<strong>Angle</strong> — The angle at which the halftone screen is rotated relative to horizontal. In CMYK printing, each colour channel uses a different screen angle to prevent moiré patterns when the four screens are printed on top of each other. Traditional screen angles: Cyan 105°, Magenta 75°, Yellow 90°, Black 45°. The angle difference between channels is critical — the "wrong" screen angles cause visible moiré interference patterns.

<strong>Spot function</strong> — A mathematical function that determines the shape of the halftone dots. The spot function maps a point in the halftone cell (with coordinates in [-1,+1]) to a threshold value; pixels in the cell are inked if their spot function value is less than the grey level being reproduced. The spot function shape determines dot shape: a circular spot function produces round dots; an elliptical spot produces elliptical dots; a line spot function produces line screens.

Examples of spot functions: - <strong>Round dots</strong>: <code>{ dup mul exch dup mul add 1 exch sub }</code> (Euclidean distance from centre) - <strong>Diamond dots</strong>: <code>{ abs exch abs add 1 sub }</code> - <strong>Line screen (horizontal)</strong>: <code>{ pop }</code> (threshold by x-position only)

PDF halftone dictionary types

PDF defines five halftone dictionary types:

<strong>Type 1 — Spot function halftone</strong> — The traditional specification: frequency, angle, and spot function (PostScript function that defines dot shape). The frequency and angle can be given in device space (device-dependent) or requested values (the actual output values are determined by the printing device).

<strong>Type 5 — Multi-component halftone</strong> — Contains multiple component halftones (typically one per colorant) plus a default halftone. Used to specify different screen parameters for each CMYK (or spot colour) channel. A Type 5 halftone dictionary references Type 1 (or Type 6/10/16) halftone dictionaries for each component.

<strong>Type 6 — Threshold array halftone (8-bit)</strong> — Specifies halftone as a threshold array: a rectangular array of 8-bit threshold values. Each cell position in the halftone pattern has a threshold value; a pixel is inked if the input grey level (0–255) is greater than the threshold. Type 6 arrays are used in digital printing workflows where the halftone algorithm is specified as an explicit threshold matrix rather than a spot function.

<strong>Type 10 — Threshold array halftone (8-bit, varying cell sizes)</strong> — Similar to Type 6 but allows two different cell sizes (for the two halves of a diamond cell pattern). Used for certain special screening algorithms.

<strong>Type 16 — Threshold array halftone (16-bit)</strong> — A 16-bit version of the threshold array for high-precision halftoning. Supports finer gradations of threshold than the 8-bit Type 6.

For most professional print production workflows, halftone screens are specified by the printer or RIP rather than the PDF — the PDF is created with halftone specifications that are overridden by the press's own screening configuration. In-RIP halftoning (where the screen parameters are entirely set by the printer) is common in offset lithography.

Stochastic screening and FM halftoning

Traditional halftone screens (AM — Amplitude Modulation screening) vary dot size while keeping dot spacing constant. Modern digital printing also uses stochastic (FM — Frequency Modulation) screening:

<strong>AM halftone</strong> (traditional): Dots are arranged in a regular grid. Larger dots for darker tones; smaller dots for lighter tones. Pattern is regular and somewhat visible at reading distance.

<strong>FM halftone</strong> (stochastic): Dots are the same size but randomly distributed — more dots in darker areas, fewer in lighter areas. The random placement eliminates moiré patterns and can produce finer apparent resolution, but requires higher printer resolution to avoid a rough "sandy" texture.

<strong>Hybrid AM/FM</strong>: Some modern screening algorithms (XM screening, from Kodak; Crescendo, from Agfa) use AM for midtones and FM for highlights and shadows, combining the benefits of both approaches.

In PDF, stochastic screening is typically handled by Type 6/16 threshold array halftones with threshold values derived from stochastic algorithms, or by leaving screening entirely to the RIP (which implements the stochastic algorithm internally). The spot function approach of Type 1 halftones is inherently AM.

<strong>Halftones and PDF/X</strong> — PDF/X standards (ISO 15930 series) govern PDF for print exchange. PDF/X does not mandate specific halftone parameters — these are typically device-specific and overridden by the printer's RIP. However, PDF/X does require that colour-management information (output intent ICC profiles) be present, which is the context within which any device halftone rendering will occur.

Frequently asked questions

What is moiré and how do halftone screen angles prevent it?

Moiré is a visual interference pattern that appears when two regular geometric patterns (like dot grids) overlap at a small angle. In CMYK printing, moiré occurs when two halftone screens are printed at angles that create a visible beat frequency. The classic screen angles (C=105°, M=75°, Y=90°, K=45°) are chosen so that the angular differences between the most visually prominent channels (CMK) are 30° or 60° — the angular differences at which the interference pattern (called a rosette) is smallest and most visually acceptable. Perfect rosette is a tiny, symmetric pattern that is nearly invisible at reading distance. Misregistered screens — where the ink layers don't align precisely — cause the rosette to become visible, which is why colour registration is critical in offset printing.

Does halftoning affect PDFs viewed on screen?

No. Halftone specifications in PDF (the /HT key in ExtGState and halftone dictionary objects) are only used when rendering to output devices that require halftoning — primarily print devices. PDF viewers on screen use anti-aliasing instead of halftoning to produce smooth-appearing images and text. The halftone parameters embedded in a PDF are ignored by screen rendering. This means that a PDF may look identical on screen regardless of whether it contains halftone specifications — the halftone parameters only affect the print output. For most business and general-purpose PDFs, halftone specifications are not present at all and the printing device uses its own built-in halftone configuration.

What is lpi and how does it relate to printer dpi?

Lpi (lines per inch) is the halftone screen frequency — the number of halftone cells per inch. Dpi (dots per inch) is the printer resolution — the number of addressable ink dots per inch. The relationship: a printer needs enough dpi to support a given lpi while also supporting enough grey levels (dot sizes). Approximately: grey_levels = (dpi / lpi)² + 1. At 600 dpi and 150 lpi: grey levels = (600/150)² + 1 = 16 + 1 = 17 levels. At 2400 dpi and 150 lpi: grey levels = (2400/150)² + 1 = 256 + 1 = 257 levels (8-bit quality). This is why high-quality halftone printing requires high-resolution printers — a 300 dpi printer cannot produce 256 grey levels at 150 lpi. Modern digital presses at 2400+ dpi can produce photographic-quality halftone output.