# Roofing Invoice Parity Example

Reference image:
- `examples/roofing_invoice/source.png`

Primary template files:
- `examples/roofing_invoice/templates/invoice.html`
- `examples/roofing_invoice/templates/invoice.css`

## Render Via CLI (Source Build)

```powershell
.\.venv\Scripts\fullbleed.exe --json render `
  --profile preflight `
  --html examples\roofing_invoice\templates\invoice.html `
  --css examples\roofing_invoice\templates\invoice.css `
  --asset examples\roofing_invoice\vendor\css\bootstrap.min.css `
  --asset-kind css `
  --asset-name bootstrap `
  --asset examples\roofing_invoice\vendor\fonts\Inter-Variable.ttf `
  --asset-kind font `
  --asset-name inter `
  --emit-image examples\roofing_invoice\output\pages_png `
  --image-dpi 150 `
  --emit-jit examples\roofing_invoice\output\roofing_invoice.jit.jsonl `
  --emit-perf examples\roofing_invoice\output\roofing_invoice.perf.jsonl `
  --emit-manifest examples\roofing_invoice\output\roofing_invoice.manifest.json `
  --emit-page-data examples\roofing_invoice\output\roofing_invoice.page_data.json `
  --deterministic-hash examples\roofing_invoice\output\roofing_invoice.sha256 `
  --repro-record examples\roofing_invoice\output\roofing_invoice.repro.json `
  --out examples\roofing_invoice\output\roofing_invoice.pdf
```

Expected key outputs:
- `examples/roofing_invoice/output/roofing_invoice.pdf`
- `examples/roofing_invoice/output/pages_png/roofing_invoice_page1.png`
- `examples/roofing_invoice/output/roofing_invoice.jit.jsonl`
- `examples/roofing_invoice/output/roofing_invoice.perf.jsonl`
- `examples/roofing_invoice/output/roofing_invoice.manifest.json`
- `examples/roofing_invoice/output/roofing_invoice.repro.json`

## Repro Check

```powershell
.\.venv\Scripts\fullbleed.exe --json render `
  --profile preflight `
  --html examples\roofing_invoice\templates\invoice.html `
  --css examples\roofing_invoice\templates\invoice.css `
  --asset examples\roofing_invoice\vendor\css\bootstrap.min.css `
  --asset-kind css `
  --asset-name bootstrap `
  --asset examples\roofing_invoice\vendor\fonts\Inter-Variable.ttf `
  --asset-kind font `
  --asset-name inter `
  --repro-check examples\roofing_invoice\output\roofing_invoice.repro.json `
  --out examples\roofing_invoice\output\roofing_invoice.rerun.pdf
```

## Python Harness

```powershell
.\.venv\Scripts\python.exe examples\roofing_invoice\report.py
```

## Visual Parity Pass Notes

What worked best:
- Start from `fullbleed init` so bootstrap + inter are vendored and pinned.
- Register CSS/fonts as assets (`--asset ...`) instead of relying on HTML `<link>` tags.
- Keep layout in explicit page-space units and tune from major blocks to micro-typography.
- Use `--emit-image` for fast visual loops and keep `--emit-jit`/`--emit-perf` on for debugging.

Observed constraints during parity work:
- Source image is a cropped viewport, not a full letter-page render; compare composition zones, not page-bottom whitespace.
- `--fail-on overflow` may still report false positives for full-page wrappers in this fixture.
- `--emit-page-data` is `null` here (expected unless paginated-context features are used).

Current status for this fixture:
- Visual output is close in structure, spacing rhythm, and hierarchy.
- `--fail-on font-subst` passes with vendored `Inter`.
