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

feat: added support for exporting DocItem to an image when page image is available #379

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

sh-gupta
Copy link
Contributor

Updated the minimum docling-core version to 2.4.0 so that DocItem now supports the get_image function. One can now get the image corresponding to any DocItem as long as PdfPipelineOptions.generate_page_images = True.

Deprecated the PdfPipelineOptions.generate_table_image as this option is equivalent to setting PdfPipelineOptions.generate_page_images = True and then using TableItem.get_image.

Issue resolved by this Pull Request:
Resolves #299

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

@sh-gupta sh-gupta requested a review from cau-git November 19, 2024 14:33
@sh-gupta sh-gupta self-assigned this Nov 19, 2024
Copy link

mergify bot commented Nov 19, 2024

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

@dolfim-ibm dolfim-ibm self-requested a review November 19, 2024 14:38
dolfim-ibm
dolfim-ibm previously approved these changes Nov 19, 2024
Copy link
Contributor

@dolfim-ibm dolfim-ibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

Copy link
Contributor

@PeterStaar-IBM PeterStaar-IBM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@dolfim-ibm dolfim-ibm merged commit 3f91e7d into main Nov 19, 2024
8 checks passed
@dolfim-ibm dolfim-ibm deleted the shubham/docitem-images branch November 19, 2024 15:28
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.

Allow extraction of formula images similar to tables and pages
3 participants