Conversation
Remove internal config dependency so unstructured can use this as the single source of truth for PDF rendering without duplicating the function.
1 task
No longer referenced after convert_pdf_to_image takes dpi as an explicit parameter — callers pass their own config value instead.
Collaborator
Author
|
Added a second commit that removes |
cragwolfe
approved these changes
Apr 3, 2026
github-merge-queue Bot
pushed a commit
to Unstructured-IO/unstructured
that referenced
this pull request
Apr 3, 2026
…erence (#4315) ## Summary - Delete `_render_pdf_pages` from `pdf_image_utils.py` (~70 lines) - Delegate `convert_pdf_to_image` and `convert_pdf_to_images` to `unstructured-inference`'s implementation (which already has lazy per-page rendering since v1.5.5) - Pass `env_config.PDF_RENDER_DPI` explicitly instead of relying on internal config - Bump `unstructured-inference` dep to `>=1.6.2` Peak memory for `path_only=True` drops from O(n_pages) to O(1 page) — 97% reduction on a 100-page PDF. ## Depends on - [ ] Unstructured-IO/unstructured-inference#501 (make `dpi` explicit) --------- Co-authored-by: codeflash-ai[bot] <178395242+codeflash-ai[bot]@users.noreply.github.com> Co-authored-by: Kevin Turcios <turcioskevinr@gmail.com>
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.
Summary
dpian explicit parameter (default 200) onconvert_pdf_to_imageinstead of readinginference_config.PDF_RENDER_DPIinternally_render_pdf_pagesimplementationdpiexplicitlyChangelog
Depends on / blocks