Before 1.4, every paint operation fully covered what was underneath (the opaque "painter's model"). 1.4 added a full compositing model: each object has an opacity, a shape and a blend mode, and objects can be composited in groups before being combined with the backdrop.
% In resources: /ExtGState << /GS1 << /ca 0.5 /CA 0.5 /BM /Multiply >> >> q /GS1 gs % apply 50% opacity, Multiply blend 0 0 1 rg 100 100 200 200 re f Q
Graphics state keys
These are keys in an ExtGState dictionary, applied with gs; no operator sets them.
| Key | Meaning |
|---|---|
/CA, /ca | Constant alpha for stroking (CA) and nonstroking, i.e. fill (ca) |
/BM | Blend mode |
/SMask | Soft mask dictionary (alpha or luminosity from a group), or /None |
/AIS | Alpha-is-shape flag |
/TK | Text knockout |
Blend modes
Separable (per channel): Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion.
Non-separable: Hue, Saturation, Color, Luminosity. Compatible behaves exactly like Normal: 1.7 says not to use it, and PDF 2.0 deprecates it.
PDF 1.4 gives formulas for some of these and only describes the rest. Adobe's 2006 blend-modes addendum to the PDF 1.6 Reference adds formulas for all of them, without changing how any mode behaves. The Blend modes reference has every formula.
Transparency groups
A form XObject with a /Group << /S /Transparency … >> entry is composited as a unit, then combined with the backdrop.
/I trueThe group composites against a transparent backdrop instead of whatever is underneath.
/K trueEach element composites with the group's initial backdrop, not with earlier elements of the group. (A different
/K from the structure-element /K.)/Group on a page sets the blending color space for the page, for example /CS /DeviceCMYK for print.Read: