Repository navigation
ROB: Extract text with zero width in layout mode - #4174
Merged
stefan6419846 merged 1 commit intoOct 12, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
stefan6419846
approved these changes
Oct 12, 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.
Text drawn with a font size of 0, as in
made extract_text(extraction_mode="layout") raise "ZeroDivisionError: float floor division by zero": every glyph has zero width, so the page's fixed character width is 0 and fixed_width_page() divides by it. A horizontal scaling of 0 (0 Tz) does the same.
When the character width is 0 there is no column to align to, so the text is now placed where the line already ends: the example extracts as "Hello", matching plain mode.
The full suite passes locally (1930 tests), and the changed line is covered.
Used Claude Code (Claude Opus 5.5) to help find and patch this and to draft this description; I reviewed and tested the change.