Preserve spaces in positioned PDF text - #1902
Preserve spaces in positioned PDF text#1902Puneet Dixit (puneetdixit200) wants to merge 2 commits into
Conversation
|
Puneet Dixit (@puneetdixit200) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
9791863 to
5c3a76a
Compare
|
I reproduced #120 with the original EACL PDF and independently exercised this patch. The overall detector/fallback approach works, but I found a mixed-document regression risk worth tightening before merge: the current branch calls I prepared a focused variant at cagdasyurekli/markitdown@f338c68. The additional changes are:
On the original issue PDF, the hardened result does not start with a table pipe, contains zero Please feel free to cherry-pick or adapt the narrow-tolerance/test changes into this PR; I avoided opening a competing duplicate. |
Summary
Fixes #120
Testing
UV_CACHE_DIR=/tmp/markitdown-uv-cache uv run --project . --extra pdf --with pytest pytest tests/test_pdf_memory.py::TestPdfMemoryOptimization::test_space_starved_pdfminer_output_uses_pdfplumber_text -qUV_CACHE_DIR=/tmp/markitdown-uv-cache uv run --project . --extra pdf --with pytest pytest tests/test_pdf_memory.py tests/test_pdf_tables.py tests/test_pdf_masterformat.py -qUV_CACHE_DIR=/tmp/markitdown-uv-cache GITHUB_ACTIONS=true uv run --project . --all-extras --with pytest --with openai pytest -qUV_CACHE_DIR=/tmp/markitdown-uv-cache HATCH_ENV_TYPE_VIRTUAL_PATH=/tmp/markitdown-hatch-envs GITHUB_ACTIONS=true uv run --with hatch hatch testUV_CACHE_DIR=/tmp/markitdown-uv-cache PRE_COMMIT_HOME=/tmp/markitdown-pre-commit uv run --with pre-commit pre-commit run --all-filesgit diff --check