pdfcraft/crates/engine/src
Raj Patel 634f3d1144
Issue #1028: OCR can read pictures on pages that already have text (#1184)
* Issue #1028: OCR can read pictures on pages that already have text

Recognize Text skipped every page with text, so a picture of text on a
page that also has real text never became searchable. The engine and
the ocr_recognize tool already had skip_text_pages, but the desktop
dialog never offered it, and turning it off read the page's own text
again and added it a second time, so search found every word twice.

- Engine: always collect the page's own glyph boxes; with
  skip_text_pages false, a recognised word at least half covered by
  them (an earlier OCR layer included) is left out. OcrPage counts
  those words as already_on_page. The default still skips pages with
  text.
- Dialog: "Also recognize pages that already have text", kept with the
  other choices and used by Recognize text in multiple files too.
- Tools: ocr_recognize reports already_on_page; ocr_recognize_files
  accepts skip_text_pages.
- The two new labels in the 15 catalogs that translate the OCR dialog.
- Synthetic tests (a picture of a sentence plus real text) for the
  engine, the tool and the dialog; the engine test fails with the
  filter turned off. Unit tests for the coverage check, including
  NaN, infinite, inverted and overlapping boxes.
- parity, docs/roadmap.md M10 row and the ROADMAP.md progress log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JqiZ658tGndQaHao5Q6mdm

* Issue #1028: Czech labels for the OCR text-pages option

The Czech catalog was completed (#1066) while #1028 was in review, and
czech_covers_ui_literals requires every tl! literal: the two new
Recognize Text labels were missing, so the test failed after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JqiZ658tGndQaHao5Q6mdm

* Contributors: credit rp6186030 as Raj Patel in the About window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JqiZ658tGndQaHao5Q6mdm

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rp6186030 <25706807+rp6186030@users.noreply.github.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-11 18:45:36 -04:00
..
actions.rs Rename PrintCraft to PdfCraft (#174) 2026-10-07 16:03:57 -04:00
camera.rs M10: Enhance camera image cleans the photo up and chooses its look (part 4 of #1008, closes #1034) (#1038) 2026-10-11 14:57:31 -04:00
camera_clean.rs M10: Enhance camera image cleans the photo up and chooses its look (part 4 of #1008, closes #1034) (#1038) 2026-10-11 14:57:31 -04:00
camera_edges.rs M10: Enhance camera image finds the document's edges; rotate, crop or organize after Enhance page (part 3 of #1008) (#1027) 2026-10-11 12:31:23 -04:00
catalog.rs M10: Enhance camera image finds the document's edges; rotate, crop or organize after Enhance page (part 3 of #1008) (#1027) 2026-10-11 12:31:23 -04:00
commands.rs i18n: let the layers below hand their sentences over, so they can be translated (#478) 2026-10-11 15:45:51 -04:00
compare.rs M4: replace selected pages from organize toolbar and context menus (#786) (#1149) 2026-10-11 18:32:29 -04:00
dates.rs Content edits on heavy documents: narrow refresh, cached appearances, per-page invalidation (#1122) 2026-10-11 17:28:30 -04:00
export.rs M3: harden render and CLI failure surfaces (#669) 2026-10-09 22:32:48 -04:00
js.rs XFA: run the forms' JavaScript: calculations, validation, rows, visibility (#60) (#230) 2026-10-08 04:16:54 -04:00
lib.rs Issue #1185: Protect refuses passwords that encryption would make empty or equal (#1186) 2026-10-11 18:30:00 -04:00
links.rs Security: refuse mailto attachments, show link hosts in punycode (follow-up to #104) (#337) 2026-10-08 16:07:25 -04:00
ocr.rs Issue #1028: OCR can read pictures on pages that already have text (#1184) 2026-10-11 18:45:36 -04:00
optimizer.rs M11: Optimize PDF and Reduce File Size run in the background with a progress bar (#370) 2026-10-08 18:46:34 -04:00
signature_image.rs feat: Scale down large signature images instead of rejecting (#1075) (#1124) 2026-10-11 15:10:03 -04:00
tests.rs Issue #1028: OCR can read pictures on pages that already have text (#1184) 2026-10-11 18:45:36 -04:00
upright_image.rs Phone photos follow EXIF orientation; image signatures stay upright on rotated pages (#434) (#485) 2026-10-09 09:14:55 -04:00
xfa.rs XFA: import and export data files, and pictures for image fields (#1175) 2026-10-11 18:29:35 -04:00