Skip to content

bug/partition_pdf with analysis True and pdf_image_dpi != 200 #3985

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

Open
MSutt opened this issue Apr 11, 2025 · 0 comments
Open

bug/partition_pdf with analysis True and pdf_image_dpi != 200 #3985

MSutt opened this issue Apr 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@MSutt
Copy link

MSutt commented Apr 11, 2025

Describe the bug
When using partition_pdf on a filepath with analysis=True and a value for pdf_image_dpi, the analysis drawings are at wrong scale.

To Reproduce

file_path = "path_to_my_pdf.pdf"
partition_pdf(filename=file_path, analysis=True, pdf_image_dpi=72, strategy="hi_res")

Expected behavior
Having the drawing at correct scale

Additional context
My understanding is that the problems occures because the function save_analysis_artifiacts called here uses an AnalysisDrawer that calls convert_pdf_to_image without using the pdf_image_dpi given to the partition_pdf function so it uses a 200 dpi value.

@MSutt MSutt added the bug Something isn't working label Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant