# 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: Two-page park brochure with photographs, maps, compact text regions, and irregular layout. Categories: park-brochure, complex-layout, image-heavy, maps. Canonical source: https://www.nps.gov/mora/planyourvisit/park-brochure.htm
- 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` | 1188 | 1151 | 0.962 | 0 | 0.772 | 0.734 | 1 |
| 2 | `needs-review` | 0 | 0 | 1 | 0 | 0.013 | 0.074 | 0 |

## Issue Categories

| Category | Status | Evidence |
| --- | --- | --- |
| Text reconstruction and word boundaries | `passed` | All analyzed pages passed; lowest token coverage is 0.962 on page 1. |
| Page geometry and text-run structure | `needs-review` | 1 page dimension check(s) and 0 text-run count check(s) need review; max run-count delta is 235. |
| Text wrapping around images and vector objects | `needs-review` | 1 text/image overlap(s) and 0 text/vector overlap(s) were found. |
| Visual foreground parity | `needs-review` | Max foreground delta is 0.772; max source-only foreground ratio is 0.758; max HTML-only foreground ratio is 0. |
| Visual color parity | `needs-review` | Max mean CIE Lab color delta is 39.124; max severe color-delta ratio is 0.734; minimum compared page-pixel ratio is 0.183. |
| 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

- 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.
- The visual probe compared at least one page using only the overlapping crop because renderer/browser pixel dimensions differed beyond the probe tolerance.
- 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, `page-dimensions`: Continuous semantic HTML width differs from the PDF page width.
- Page 1, `text-image-overlap`: 1 text run(s) overlap rendered image boxes.
- Page 1, `visual-foreground-mask`: PDF render and browser page screenshot have different pixel dimensions; foreground masks were compared across the overlapping region only.
- Page 1, `visual-color-difference`: PDF render and browser page screenshot have different pixel dimensions; color was compared across stable foreground interiors in the overlapping region only.
- Page 2, `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)
