mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 06:32:03 +00:00
`planTextLayerReads` grouped whole pages into the reads the deadline allows, with no bound on a read's size, while the text path refuses a part past `OCR_TEXT_READ_MAX_CHARS`. A dense report in a request's three reads went out as reads of 12 000 characters and more, which ends at the output limit or loses rows. `planTextLayerChunks` now cuts a page longer than one read at line boundaries, keeps a page per read while the deadline allows that many, and otherwise packs pages into reads of at most twice the surface's target (8 000 characters for the lab scan, 5 000 for the document extraction). What the reads cannot take is read from the start, and the pages left over are reported with the pages without a text layer: `unreadPages` on the lab scan, `extractionIncomplete` on a document. Refs #1311