# HTML Quality Probe

These checks are diagnostic and non-gating. A `needs-review` status means the generated artifacts found a likely conversion-quality issue, not that artifact generation failed.

- Status: `needs-review`
- Source PDF: [../source.pdf](../source.pdf)
- Generated HTML: [../semantic-continuous/index.html](../semantic-continuous/index.html)
- Sample notes: Six assembled Ghent test pages exercising color, shadings, overprint, DeviceN, fonts, masks, and complex graphics.
- Text reference: `pdfbox-net-run-fallback`
- Pages analyzed: 6

## Page Summary

| Page | Status | Source words | HTML words | Token coverage | Long HTML tokens | Foreground delta | Severe color delta | Text/object overlaps |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 1 | `needs-review` | 654 | 654 | 1 | 0 | 0.036 | 0.082 | 111 |
| 2 | `needs-review` | 598 | 558 | 0.926 | 0 | 0.061 | 0.024 | 48 |
| 3 | `needs-review` | 551 | 554 | 0.995 | 0 | 0.032 | 0.085 | 142 |
| 4 | `needs-review` | 639 | 639 | 1 | 0 | 0.015 | 0.088 | 165 |
| 5 | `needs-review` | 631 | 630 | 0.997 | 0 | 0.001 | 0.074 | 167 |
| 6 | `needs-review` | 517 | 541 | 0.977 | 0 | 0.01 | 0.11 | 118 |

## Issue Categories

| Category | Status | Evidence |
| --- | --- | --- |
| Text reconstruction and word boundaries | `passed` | All analyzed pages passed; lowest token coverage is 0.926 on page 2. |
| Page geometry and text-run structure | `needs-review` | 0 page dimension check(s) and 2 text-run count check(s) need review; max run-count delta is 22. |
| Text wrapping around images and vector objects | `needs-review` | 23 text/image overlap(s) and 728 text/vector overlap(s) were found. |
| Visual foreground parity | `passed` | Max foreground delta is 0.061; max source-only foreground ratio is 0.042; max HTML-only foreground ratio is 0.01. |
| Visual color parity | `needs-review` | Max mean CIE Lab color delta is 8.513; max severe color-delta ratio is 0.11; minimum compared page-pixel ratio is 0.044. |
| Source fixture expectations (manual review) | `needs-review` | Captured 21 source-authored acceptance statement(s) across 6 page(s); compare them with the visual evidence before treating the fixture as passed. |
| Probe setup and tool availability | `passed` | The browser probe and available renderers ran. |

## Fixture Expectations

These source-authored statements describe the intended appearance and make the corresponding visual diffs easier to interpret.

- Page 1:
  - The shadings should look like the reference imagelike the reference image
  - a + b: must be rendered to solid Black (100C100K) rectangles a + b: must be rendered to solid Green rectangles
  - c + d: must be rendered to solid Cyan rectangles
  - a + b: must be rendered to solid Red rectangles
  - c + d: must be rendered to solid White rectanglesIf a check mark is visible in the upper right corner then DeviceN is respected (= GOOD).
- Page 2:
  - the Image Softmask (a transparency effect) is not rendered correctly.
  - Each of these transparency effects (vector soft masks) should match the reference images.
  - Each of these transparency effects (Text Softmasks) should match the reference images.
- Page 3:
  - Expected result: TrueType: &#228;&#246;&#252;&#196;&#214;&#220;&#225;&#226;&#224;ﬁ ﬂ &#169;&#174;@&#208;Œ&#198;&#216;&#230;ƒ&#255;‡‰&#254;&#189;&#240; (BookAntiqua-BoldItalic)&#228;&#246;&#252;&#196;&#214;&#220;&#225;&#226;&#224;fi fl&#169;&#174;@OE&#198;&#216;&#230;ƒ&#255;‡‰
  - Expected result: CID (Type1): &#228;&#246;&#252;&#196;&#214;&#220;&#225;&#226;&#224;ﬁﬂ&#169;&#174;@&#208;Œ&#198;&#216;&#230;ƒ&#255;‡‰&#254;&#189;&#240; (WarnockPro-BoldIt)
  - Expected result: CID (TrueType): &#228;&#246;&#252;&#196;&#214;&#220;&#225;&#226;&#224;ﬁﬂ&#169;&#174;@&#208;Œ&#198;&#216;&#230;ƒ&#255;‡‰&#254;&#189;&#240; (PalatinoLinotype BoldItalic)Arial Unicode MS – OpenType (TrueType)
  - Expected result: &#228;&#246;&#252;&#196;&#214;&#220;&#225;&#226;&#224;fi fl&#169;&#174;@OE&#198;&#216;&#230;ƒ&#255;‡‰
  - Expected result: (ExPontoMM)
  - Expected result: If the text in the line above does not look like the image in the line below
  - Expected result: (T10)
  - expected result
  - No X must be visible when rendered correctly.
  - No “X” must be visible when rendered correctly.
- Page 4:
  - Overprinting must be honored for the output.were not respected.were not respected.
- Page 5:
  - the Image Softmask (a transparency effect) is not rendered correctly.No “X” must be visible when rendered correctly.
- Page 6:
  - No X must be visible when rendered correctly.

## Current Limitations

- This fixture intentionally exercises print-production features such as color management, overprint, shading, transparency, or masks; the HTML converter currently approximates these rather than preserving production fidelity.
- Continuous semantic HTML is evaluated as reflowed content; it may not preserve the original PDF page height, per-glyph run count, or exact page-local geometry.
- Some image-backed content still behaves like fixed-position objects; text may collide with image regions.
- Large vector overlays are not semantically attached to nearby content; review whether these are decorative backgrounds, table rules, clipping masks, or true text/object collisions.
- Perceptual color differences exceed the severe-corruption threshold on at least one page; inspect the color heatmap for incorrect fills, opacity, blending, or color-space conversion.

## Findings

- Page 1, `text-image-overlap`: 2 text run(s) overlap rendered image boxes.
- Page 1, `text-vector-overlap`: 109 text run(s) overlap large rendered vector boxes.
- Page 1, `visual-color-difference`: PDF and browser colors differ severely across a material share of stable foreground interiors.
- Page 2, `text-run-count`: The browser DOM contains 159 text runs, but the extracted layout contains 181.
- Page 2, `text-image-overlap`: 5 text run(s) overlap rendered image boxes.
- Page 2, `text-vector-overlap`: 43 text run(s) overlap large rendered vector boxes.
- Page 3, `text-image-overlap`: 10 text run(s) overlap rendered image boxes.
- Page 3, `text-vector-overlap`: 132 text run(s) overlap large rendered vector boxes.
- Page 3, `visual-color-difference`: PDF and browser colors differ severely across a material share of stable foreground interiors.
- Page 4, `text-image-overlap`: 2 text run(s) overlap rendered image boxes.
- Page 4, `text-vector-overlap`: 163 text run(s) overlap large rendered vector boxes.
- Page 4, `visual-color-difference`: PDF and browser colors differ severely across a material share of stable foreground interiors.
- Page 5, `text-image-overlap`: 2 text run(s) overlap rendered image boxes.
- Page 5, `text-vector-overlap`: 165 text run(s) overlap large rendered vector boxes.
- Page 5, `visual-color-difference`: PDF and browser colors differ severely across a material share of stable foreground interiors.
- Page 6, `text-run-count`: The browser DOM contains 126 text runs, but the extracted layout contains 138.
- Page 6, `text-image-overlap`: 2 text run(s) overlap rendered image boxes.
- Page 6, `text-vector-overlap`: 116 text run(s) overlap large rendered vector boxes.
- Page 6, `visual-color-difference`: PDF and browser colors differ severely across a material share of stable foreground interiors.

## Artifacts

- [page-1-html.png](page-1-html.png)
- [page-1-source.png](page-1-source.png)
- [page-1-diff.png](page-1-diff.png)
- [page-1-color-heatmap.png](page-1-color-heatmap.png)
- [page-1-visual-report.html](page-1-visual-report.html)
- [page-2-html.png](page-2-html.png)
- [page-2-source.png](page-2-source.png)
- [page-2-diff.png](page-2-diff.png)
- [page-2-color-heatmap.png](page-2-color-heatmap.png)
- [page-2-visual-report.html](page-2-visual-report.html)
- [page-3-html.png](page-3-html.png)
- [page-3-source.png](page-3-source.png)
- [page-3-diff.png](page-3-diff.png)
- [page-3-color-heatmap.png](page-3-color-heatmap.png)
- [page-3-visual-report.html](page-3-visual-report.html)
- [page-4-html.png](page-4-html.png)
- [page-4-source.png](page-4-source.png)
- [page-4-diff.png](page-4-diff.png)
- [page-4-color-heatmap.png](page-4-color-heatmap.png)
- [page-4-visual-report.html](page-4-visual-report.html)
- [page-5-html.png](page-5-html.png)
- [page-5-source.png](page-5-source.png)
- [page-5-diff.png](page-5-diff.png)
- [page-5-color-heatmap.png](page-5-color-heatmap.png)
- [page-5-visual-report.html](page-5-visual-report.html)
- [page-6-html.png](page-6-html.png)
- [page-6-source.png](page-6-source.png)
- [page-6-diff.png](page-6-diff.png)
- [page-6-color-heatmap.png](page-6-color-heatmap.png)
- [page-6-visual-report.html](page-6-visual-report.html)
