docling-project / docling-project/docling

Include page images as REFERENCED when saving a docling document as json

Open
#1,503 1 comment 2 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

When you save a docling document as json using save_as_json and set the image_mode as imageRefMode.REFERENCED the images in the document are saved as references. However, if you generate page imags then the page_images are still embedded in the json file. This can make the json file very large.

It would be helpful if the page images were also referenced as well. Perhaps this could be handled by adding a page_mode argument, similar to image_mode. Alternatively the page images could follow the image_mode setting.

This capability would also be useful in export_to_dict.

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.