Skip to main content
Support

Browse by category

All categories
Back to Roadmap
completed critical Phase 13

Compare PDF — best-in-class browser diff

tools

Browser-local PDF comparison tool competing with Draftable / Adobe Compare Pro on the comparison surface. Files never leave your device — every byte of the text extraction, the pixel diff, and the result cache runs locally.

Lives at /tools/pdf-tools/compare-pdf.

v1 shipped 2026-03-29. Visual / overlay / text-diff modes. smartCompare pixel engine: grayscale → pixelmatch → white filter → brightness threshold → 3×3 morphological close → 8-connected CCL → region accumulator → tone classifier. dHash fast-reject for identical pages.

v2 shipped 2026-05-11. Editor template port — same chrome as PDF Editor family. Featured-tool landing page. Homepage placement.

v3 substrate shipped 2026-05-22. Strategy pattern rebuild — one driver dispatches to per-mode strategies (document / drawing / image). Shared primitives extracted into lib/. Right-pane ChangeList + filter chips + pulse-on-click + history panel. IndexedDB result cache. Engine toggle for staged rollout.

v3.1 shipped 2026-05-25. Eight algorithmic improvements distilled from a multi-agent debate vs Heckel / Pearce / Tichy / Cormode-Muthukrishnan + Liang / Breuel research. Histogram-diff anchoring (lowest-count-wins recursion per git xhistogram), dmp linesToChars line-mode pre-pass, paragraph MOVE detection, cross-page MOVE promotion, row-level MODIFY with sub-paint, 5-stage post-promotion add/remove → MODIFY pass.

v3.2 shipped 2026-05-26 (10 PRs in one day). Live-QA-driven polish marathon. Per-side MODIFY emission, word-level yellow paint, fuzzy cross-page promote, MOVE jitter tolerance, hyphen unicode coverage, pixel-fallback count alignment, orphan page counts, tighter post-promotion thresholds, pixel classifier tuning, table-cell positional MODIFY (Tier 0.5), histogram longest-run pairing, filename labels, additive pixel residual on mixed pages.

v3.3 shipped 2026-05-27 (5 PRs). Pixel-residual noise reduction bundle. RANSAC affine alignment via lib/align.ts using identity anchor pairs from text tier — cancels render-jitter false positives on vector PDFs. Pre-blur 2-px, drop oversize regions > 15% of canvas, skip morphClose by default. Belt-and-suspenders architecture: alignment cancels gross translation, blur + morph mop up sub-pixel residue.

v3.4 shipped 2026-05-27 (3 PRs). Adaptive pre-blur — 0 px when alignment near-identity (same-template forms preserve light pen strokes), 2 px otherwise. Restored signature detection thresholds (CONTENT_CHANGE_THRESHOLD 50, MIN_REGION_AREA 12, morphClose 1 by default). Synthesized Change records from pixel-residual highlights so ChangeList + pulse navigation see them uniformly (single source of truth across chip count + list + pulse).

v3.6 shipped 2026-05-29. Re-adopted the culled document-type selector and added a dedicated AEC / Blueprint mode: a hybrid that runs a word-level text pass (dimensions, callouts, title-block edits) alongside a masked geometry pixel pass (lines, circles, symbols), RANSAC-pre-aligned. In-place revisions (Ø8→Ø10, rev A→B) now collapse to a single word-level MODIFY instead of add+remove — co-location beats the string-similarity floor when the boxes overlap. Geometry MOVE detection pairs a relocated symbol (dHash + zero-mean NCC + a high-frequency interior gate as the same-outline discriminator, global mutual-best assignment, square-pad blob crop) so a repositioned detail isn’t flagged as delete+insert. Change-location tags (sheet region + XY) per change. Polish: Fonts panel populated, per-panel ruler, toolbar Export, plain-wheel scroll-zoom. Hang guard: every pdfjs worker call is wrapped in a bounded timeout + an adaptive whole-document wall-clock, so a starved worker can no longer freeze “Comparing…” forever — it aborts to a friendly, retryable error, and a timed-out page is flagged incomplete (never silently shown as “no changes”). Move-pairing is unit-verified; its end-to-end visual confirm is pending a non-contended browser.

Algorithm-truth doc + known-limits doc in .kb/work/. Bug catalogue tracks every surfaced edge case A–R.

v3.5 in planning. Wang abstract table model for per-cell diff on mismatched-row tables, multilingual / CJK / RTL support, phase-correlation image registration for image-only PDFs, confidence-% legend, ?debug=1 verbose logging, summary report PDF export, form-field diff on pages ≥ 2, tunable promote-similarity threshold slider.