We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9705f40 commit 0610d01Copy full SHA for 0610d01
docling/models/base_model.py
@@ -173,11 +173,11 @@ def prepare_element(
173
assert isinstance(element, DocItem)
174
175
# Allow the case of documents without page images but embedded images (e.g. Word and HTML docs)
176
- if len(element.prov) == 0 and isinstance(element, PictureItem):
+ if isinstance(element, PictureItem):
177
embedded_im = element.get_image(conv_res.document)
178
if embedded_im is not None:
179
return ItemAndImageEnrichmentElement(item=element, image=embedded_im)
180
- else:
+ elif len(element.prov) == 0:
181
return None
182
183
# Crop the image form the page
0 commit comments