Skip to content

Render: an axial shading in a transparency group paints nothing, where four engines paint a gradient #1335

Description

@yfedoseev

Pre-existing — wrong in both v0.3.77 and v0.3.78, in opposite directions. Found by adjudicating all 3214 rendered pages of the release sweep against the reference panel.

What

pdfjs/test/pdfs/issue14165.pdf, page 0 (A3 landscape, 1190.5 x 841.9), mean RGB at 72 dpi:

engine mean
MuPDF 192.90
pdfium 193.42
poppler 193.19
Ghostscript 192.38
v0.3.77 0.11 — the page is painted solid black
v0.3.78 255.00 — the page is painted nothing at all

The panel agrees within 1.05 grey levels on ~193, and MuPDF resolves 39 distinct grey levels spanning 119-255, so the correct page carries a visible gradient across most of its area.

We render it as one flat extreme in both releases: fully black before, fully blank now.

Direction of travel

v0.3.78 is 62 grey levels from the panel where v0.3.77 was 193, so this release moves substantially toward correct — but "blank" is not a gradient, and no part of the intended content is drawn. It is a different failure, not a partial fix.

What the file uses

/ShadingType 2      (axial)
/S /Transparency    (transparency group)
/BM /Normal
/CS /DeviceRGB

No image, no soft mask, no exotic colour space — an axial shading painted inside a plain transparency group with the default blend mode. That combination is the whole reproducer; the file is 19,588 bytes.

Worth noting page.get_drawings() reports 0 paths under MuPDF, so the gradient is being painted by the shading operator itself rather than as a filled path — a sh inside the group, not a pattern fill.

Why the sweep nearly filed this as a fix

Ranked by change magnitude this is the single largest mover in the corpus (254.89 grey levels), and going from solid black to blank looks like a repair if you only read the delta. It is only when the panel is consulted that both arms turn out to be wrong. This is the case the project guidance about adjudicating render deltas against a reference is describing — a coverage drop is not automatically a fix any more than it is automatically a regression.

Related colour/shading family: #1287, #1288, #1290, #1306, #1278. None of them covers this document or the transparency-group interaction.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions