docling-project / docling-project/docling

Add picture max_size options to reduce memory usage

Open
#2,477 1 comment 0 reactions 0 assignees View on GitHub
enhancement triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Requested feature

There're some PDFs (maybe scanning copy) contains large pictures holds cost lots of memory.
So I'm try to find a way to scaling page picture.

### Alternatives

I have two ideas:

1. The `Page.get_image` have a `max_size` param, so just set it with options.

2. There's only `PdfPipelineOptions.images_scale` for generating a extra scaled picture in `PagePreprocessingModel`, so just let the `image_scale` be the default page picture scale, and all other models using it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.