You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Blend modes (ExtGState BM) are ignored: every mark composites as Normal #138
The renderer does not read the BM entry of an ExtGState at all: nothing in the package mentions it. Every mark is composited with Normal, whatever the document asks for.
PDF 32000-1:2008 §11.3.5 defines the separable modes (Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, HardLight, SoftLight, Difference, Exclusion) and the non-separable ones (Hue, Saturation, Color, Luminosity). BM may also be an array, in which case the first mode the reader recognises is used (§11.6.3).
Effect
Pages that use blend modes render with the wrong colours. Examples are highlighter-style annotation appearances drawn with Multiply, and designed documents that use Screen or Overlay. poppler, MuPDF and pdf.js all honour BM.
Suggested scope
Parse BM (name or array) into the graphics state.
Implement the separable modes in the compositing step.
Add the non-separable modes.
Check against poppler on a corpus page per mode.
Found while designing PDF to SVG output for go-pdfkit/bentogap (SVG mix-blend-mode would carry it).
Prior art: priorart "blend mode BM" at 2026-11-22 11:17 CET reported prior art; checked: priorart 'blend mode BM': only loose matches (#111, #3, #21); git grep finds no BM in the package
Activity
feat: PageSVG, an SVG device behind the device seam
feat: PageSVG, an SVG device behind the device seam
feat: PageSVG, an SVG device behind the device seam (#140)