Repository navigation
Commit d6480df
src/table.py: find_tables(): keep quad corrections on for the line-based finder.
find_tables() sets minimum glyph heights so every char on a line shares
one top and bottom, but those only apply while quad corrections are on.
Importing pymupdf4llm turns them off for the whole process (eagerly on
`import pymupdf` in 2.0), and since #5205 find_tables() itself turns them
off before get_layout() whenever use_layout is set. The line-based finder
then built its chars from exact glyph boxes: a "." sits lower than the
digits around it, is grouped onto a line of its own, and "0.74" is
extracted as "0 74\n.".
Turn corrections on before make_chars() when no layout boxes are used.
The layout path, which turns them off on purpose, is unchanged.
tests/test_tables.py: test_5198(): new.
Fixes #5198.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1d34e04 commit d6480df
2 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3225 | 3225 | | |
3226 | 3226 | | |
3227 | 3227 | | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
3228 | 3237 | | |
3229 | 3238 | | |
3230 | 3239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
0 commit comments