mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-31 14:34:40 +00:00
fix image index in word backend
Signed-off-by: Manuel030 <manuelenrique.plank@gmail.com>
This commit is contained in:
parent
d7072b4b56
commit
1b7a3756e0
@ -503,8 +503,9 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
image_bytes = BytesIO(image_data)
|
||||
# Open the BytesIO object with PIL to create an Image
|
||||
pil_image = Image.open(image_bytes)
|
||||
level = self.get_level()
|
||||
doc.add_picture(
|
||||
parent=self.parents[self.level],
|
||||
parent=self.parents[level - 1],
|
||||
image=ImageRef.from_pil(image=pil_image, dpi=72),
|
||||
caption=None,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user