Skip to content

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

Open
@MSutt

Description

@MSutt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions