Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly patch pdfminer to avoid unnecessarily and unsuccessfully repairing PDFs with long content streams, causing needless and endless OCR #3822

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dhdaines
Copy link

@dhdaines dhdaines commented Dec 12, 2024

Fixes: #3815

Verified on my very large documents that it doesn't unnecessarily and unsuccessfully "repair" them.

You may or may not wish to keep the version check in patch_psparser. Since you're pinning the version of pdfminer.six and since it isn't guaranteed that the bug in question will be fixed in the next pdfminer.six release (but it is rather serious, so I should hope so), then perhaps you just want to unconditionally patch it.

Also corrected an import so that if you do feel like using a newer version of pdfminer.six, it won't break on you.

@dhdaines dhdaines changed the title Fix the fix to pdfminer Correctly patch pdfminer to avoid unnecessarily and unsuccessfully repairing PDFs with long content streams, causing needless and endless OCR Dec 12, 2024
@dhdaines dhdaines changed the title Correctly patch pdfminer to avoid unnecessarily and unsuccessfully repairing PDFs with long content streams, causing needless and endless OCR fix: Correctly patch pdfminer to avoid unnecessarily and unsuccessfully repairing PDFs with long content streams, causing needless and endless OCR Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug/Unstructured unnecessarily "repairs" then falls back to OCR on extremely large documents
1 participant