Test 11 Overlay Comparison — Page 2

Gold Standard (green) vs Rollback Output (red) — all measurements in PDF px (800×534 canvas)

Boundary Comparison (PDF px, top-down)

BoundaryGold StandardRollback OutputDelta (PDF px)Delta (PS px)
Top visible text (Page 2)69.070.0+1.0+4.1
Bottom visible text (Page 2)398.8396.0-2.8-11.8
Envelope height329.8326.0-3.8
Scale factors
Photoshop → PDF X: ×0.24002
Photoshop → PDF Y: ×0.24000
Photoshop canvas: 3333 × 2225
PDF canvas: 800 × 534
Rollback engine constants (Page 2)
topMarginContinuation: pageH - 70 = 464 (pdf-lib Y)
→ top-down: 70 px
bottomMargin: 113 (pdf-lib Y hard stop)
Last drawable line: ≥ 113+25 = 138 (pdf-lib Y) → top-down ≤ 396 px

Visual Overlay — Page 2 Boundary Guide

Green dashed = Gold Standard approved boundaries  |  Red dashed = Rollback output boundaries  |  Orange dotted = Hard stop (bottomMargin=113)  |  Blue dashed = Page 2 start (topMarginContinuation)

Diagnosis

✅ Top boundary (Page 2 start)
Gold Standard: 69.0 px   Rollback: 70.0 px   Delta: +1.0 px
Within tolerance. topMarginContinuation = pageH - 70 matches the Gold Standard top boundary.
✅ Bottom boundary (last visible text line)
Gold Standard: 398.8 px   Rollback: 396.0 px   Delta: -2.8 px
Hard stop (bottomMargin=113) is at top-down px 421. Last drawable line baseline ≈ 396 px. Gold Standard last visible text ≈ 398.8 px. Within tolerance.
ℹ️ Implied Gold Standard bottomMargin
If the last visible text baseline in Test 11 was at top-down Y = 398.8 px, and lineHeight = 25px, then the hard stop (pdf-lib Y) must have been ≥ 398.8 px top-down, meaning bottomMargin ≥ 135px.

Current bottomMargin = 113 → last line ≈ 396 px top-down. Gold Standard bottom ≈ 398.8 px top-down.

To match the Gold Standard bottom boundary exactly, bottomMargin would need to be ≈ 135px (vs current 113px — a delta of 22px).

Note: This analysis is provided for informational purposes only. No code changes are made here.

Rollback PDF Artifact

Generating PDF...