# 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: Long mathematics paper with dense notation, formulas, Type 1 fonts, and extensive citation links. Categories: math-focused, formulas, text-heavy, links. Canonical source: https://arxiv.org/abs/1910.14368v1
- Text reference: `pdfbox-net-run-fallback`
- Pages analyzed: 2

## Page Summary

| Page | Status | Source words | HTML words | Token coverage | Long HTML tokens | Foreground delta | Severe color delta | Text/object overlaps |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| 1 | `needs-review` | 349 | 336 | 0.951 | 0 | 0.609 |  | 0 |
| 2 | `passed` | 558 | 573 | 0.977 | 0 | 0.111 | 1 | 0 |

## Issue Categories

| Category | Status | Evidence |
| --- | --- | --- |
| Text reconstruction and word boundaries | `passed` | All analyzed pages passed; lowest token coverage is 0.951 on page 1. |
| Page geometry and text-run structure | `passed` | Page dimensions passed where measured; 1 continuous semantic-flow run-count check(s) were skipped because source runs are intentionally grouped. |
| Text wrapping around images and vector objects | `passed` | No text overlaps with image boxes or large vector boxes were found on analyzed pages. |
| Visual foreground parity | `needs-review` | Max foreground delta is 0.609; max source-only foreground ratio is 0.111; max HTML-only foreground ratio is 0.679. |
| Visual color parity | `skipped` | Max mean CIE Lab color delta is 36.635; max severe color-delta ratio is 1; minimum compared page-pixel ratio is 0. |
| 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

- Mathematical expressions are reconstructed from positioned PDF glyphs; complex fractions, roots, and grouped formula runs may require manual visual review.
- The visual probe compared at least one page using only the overlapping crop because renderer/browser pixel dimensions differed beyond the probe tolerance.
- The HTML contains additional foreground pixels compared with the PDF render on at least one page, which often means duplicated glyphs, fallback text, or unmodeled object masks.

## Findings

- Page 1, `visual-foreground-mask`: PDF render and browser page screenshot have different pixel dimensions; foreground masks were compared across the overlapping region only.

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