Skip to content

B-IHZ6-ocr-bounding-box-regions-for-pdf-text-layer-pages-and

determined-ocr’s bounding-box regions (#1362, #1364) only cover images recognized by Apple Vision. Two real gaps remain, both scoped but not attempted:

  • PDF pages served from an embedded text layer have no geometry. page.string in the Swift helper returns characters with no bounds; PDFKit’s per-character bounds (characterBounds(at:)/PDFSelection) are a different construction than Vision’s line rects, so mixing the two would put two coordinate conventions behind one field name. A page contributes text without regions today, and the viewer already tolerates that — but it means a document with both a text-layer page and a rasterized page has boxes on one and not the other.
  • tesseract emits no regions at all. Its CLI can produce TSV output carrying per-word boxes, which is a separate change from the vision path: the geometry would be word-level where Vision’s is line-level, so the two engines’ outputs need reconciling (either accepted as a genuine granularity difference the UI displays differently, or word boxes merged into line-shaped ones) before it’s a straightforward field addition.

Neither is gated by anything else — Capability::Ocr is already flipped to Rust, so this is scoped, additive work inside an already-shipped capability whenever it’s prioritized.


← Back to Backlog