Repository navigation
fix(pdf): keep layout-table words as text when tables are off - #1142
Merged
artiz merged 2 commits intoNov 18, 2026
Merged
Conversation
`--no-table-former` / `--no-tables` is docling's do_table_structure=False.
Layout still runs. A region it marked as a table was reconstructed with
the geometric grid, and the words inside it left the text list. Release
those regions before the containment drop so the words stay text items,
each with its own box.
The geometric grid stays when TableFormer was requested and its model
files are missing, and in the browser build, which has no TableFormer.
The regression is an anonymized Texas oversize permit
(tests/data/tx_osow_anonymized.pdf). The company-name section and the
repeated copies of that name are blank. Axle and Miles, which the grid
used to swallow, come back as located text.
Ran on rustc 1.100.0:
cargo test --lib --tests -p docling-core -p docling -p docling-asr \
-p docling-serve -p docling-pdf
and on the CI lint toolchain 1.96.0:
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
PDF snapshots were not regenerated. This path runs only when table
structure is off, so the TableFormer-on baselines should not move.
Signed-off-by: BlackWolf <github@dungbusters.com>
Member
|
Thanks, keeping these words is a real improvement over the grid swallowing them. A few things before merging:
|
docling 2.150 still emits an empty table when structure is off. This port keeps the words as text, and the comments and MIGRATION.md now call that a deliberate divergence. The table region stays through OCR, so a scanned page's table crop is read before the region is dropped. Releasing it first lost those words when the text detector was absent. The permit fixture no longer carries the permit number, US DOT number, plate, VIN, or route. Tests cover the worker with tables off and with TableFormer missing, and a scanned page whose only words came from the table crop. Signed-off-by: BlackWolf <github@dungbusters.com>
Contributor
Author
|
Addressed the four points in ed55070.
|
artiz
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--no-table-former/--no-tablesis docling'sdo_table_structure=False. Layout still runs. A region it marked as a table was reconstructed with the geometric grid, and the words inside it left the text list. Those regions are now released before the containment drop, so the words stay text items, each with its own box.The geometric grid remains when TableFormer was requested and its model files are missing, and in the browser build, which has no TableFormer.
The regression is an anonymized Texas oversize permit,
crates/docling-pdf/tests/data/tx_osow_anonymized.pdf. The company-name section and the repeated copies of that name are blank.Axle:andMiles, which the grid used to swallow, come back as located text.Ran on rustc 1.100.0:
and on the CI lint toolchain 1.96.0:
The PDF snapshot harness was not run (no ONNX models in this checkout). This path runs only when table structure is off, so the TableFormer-on baselines should not move.
docs/PDF_CONFORMANCE.mdis unchanged.