Engineering Journal
Pdf Processor
Pdf Processor

Coordinate Spaces and Page Snap: A Three-Part Series on Silent Math Bugs in a PDF Editor

2026-05-30

TLDR

Interactive document engineering tools can operate without throwing runtime errors while quietly emitting incorrect math outputs. During UI development of the Ginexys PDF Processor, three silent defects were identified: unit mismatch between PDF user points and viewport pixels, scroll synchronization errors between fixed spatial PDF pages and variable semantic HTML documents, and state drift across three concurrent editing surfaces.
Series PartFoundational InvariantArchitectural Remediation
Part 1: Coordinate SpacesUnit equivalence across transformsDerive explicit vWidth/vFont scale properties
Part 2: Multi-Surface SyncSpatial vs. Semantic ruler separationIntersectionObserver ratio-based page tracking
Part 3: Single Source of TruthState consistency across surfacesControlled input pattern with source guard flags
Part 4: Root Pattern AnalysisEquivalence disciplineStrict unit type segregation & invariant checks

The four-part invariant series

Part 1: coordinate space discipline

Part 2: spatial vs. Semantic page synchronization

Part 3: single source of truth across editing surfaces

Part 4: the invariant anti-pattern

Rule of thumb: Silent math bugs survive unit tests because they fail gracefully without crashing. Validate foundational domain invariants explicitly across transform boundaries.
Read this post in the full Engineering Journal →