Skip to main content

Module inmem_raster

Module inmem_raster 

Source
Expand description

In-memory Image-XObject → table lattice (WASM-safe; no pdfimages). In-memory raster table recovery (WASM-safe).

First principles: PDF Image XObjects are the pixel source (ISO 32000). Ruled tables are recoverable from projection of dark ink — no Poppler / Tesseract process for page render. Cell text uses crate::pdf::ocr.

Structs§

RasterCandidate
Prepared OCR candidate for the two-phase (plan → OCR → finish) path.
RasterCandidateMeta
Serializable candidate metadata (no pixel buffer).

Enums§

RasterCandidateKind
How OCR words from a raster candidate should be assembled.

Functions§

bordered_table_is_plausible
True when a recovered bordered table looks contentful enough to keep.
build_table_from_candidate
Build a TableBorder from a prepared candidate + optional OCR words.
build_text_chunks_from_candidate
Convert OCR words from a text-blocks candidate into page-space TextChunks.
collect_raster_candidates
Collect OCR candidates from Image XObjects (no OCR yet).
ocr_words_to_text_chunks
Map OCR words into page-space text chunks (shared by TextBlocks assembly and Table→text fallback when a lattice cannot be formed).
prepare_candidate
Decode + pre-filter a single Image XObject into an OCR candidate.
recover_embedded_raster_tables
Recover bordered tables from embedded Image XObjects on a page.