# 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: Single-page Arabic RTL organizational chart with many compact labels, connectors, and columns. Categories: rtl, arabic, organizational-chart, complex-layout, vector-heavy. Canonical source: https://www.un.org/en/delegate/page/un-system-chart
- Text reference: `pdfbox-net-run-fallback`
- Pages analyzed: 1

## Page Summary

| Page | Status | Source words | HTML words | Token coverage | Long HTML tokens | Foreground delta | Severe color delta | Text/object overlaps |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 1 | `needs-review` | 872 | 885 | 0.05 | 0 | 0.116 | 0.107 | 289 |

## Issue Categories

| Category | Status | Evidence |
| --- | --- | --- |
| Text reconstruction and word boundaries | `needs-review` | 1 page(s) need review; worst token coverage is 0.05 on page 1, with 0 high-confidence adjacent-word join(s). |
| Page geometry and text-run structure | `passed` | Page dimensions and text-run counts passed; max run-count delta is 0. |
| Text wrapping around images and vector objects | `needs-review` | 0 text/image overlap(s) and 289 text/vector overlap(s) were found. |
| Visual foreground parity | `passed` | Max foreground delta is 0.116; max source-only foreground ratio is 0; max HTML-only foreground ratio is 0.089. |
| Visual color parity | `needs-review` | Max mean CIE Lab color delta is 5.233; max severe color-delta ratio is 0.107; minimum compared page-pixel ratio is 0.66. |
| Source fixture expectations (manual review) | `skipped` | The source PDF does not contain recognizable self-describing fixture expectations. |
| Probe setup and tool availability | `passed` | The browser probe and available renderers ran. |

## Current Limitations

- Text reconstruction did not preserve all word boundaries or reading order on the affected page(s).
- 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, `word-boundaries`: Rendered HTML text appears to have lost word boundaries or token coverage.
- Page 1, `text-vector-overlap`: 289 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.

## 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)
