mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
fix: ensure handling of pictures only applies to picture with an image attribute and image part of all extensions except with emf or wmf extensions to avoid bug in adding picture to doc (just added ny signoff) Signed-off-by: Franck Benichou franck.benichou@sciencespo.fr
This commit is contained in:
parent
68be6e1873
commit
5e12d0795a
@ -394,7 +394,7 @@ class MsPowerpointDocumentBackend(DeclarativeDocumentBackend, PaginatedDocumentB
|
|||||||
# Handle Pictures
|
# Handle Pictures
|
||||||
if hasattr(shape, "image"): # make sure the Picture shape has an image attribute
|
if hasattr(shape, "image"): # make sure the Picture shape has an image attribute
|
||||||
image_part = shape.image # get the image part
|
image_part = shape.image # get the image part
|
||||||
if image_part.ext not in ["emf", "wmf"]: # all extensions except emf and wmf that lead to bug in adding picture to doc
|
if image_part.ext not in ["emf", "wmf"]: # all extensions except emf and wmf
|
||||||
self.handle_pictures(shape, parent_slide, slide_ind, doc, slide_size)
|
self.handle_pictures(shape, parent_slide, slide_ind, doc, slide_size)
|
||||||
# If shape doesn't have any text, move on to the next shape
|
# If shape doesn't have any text, move on to the next shape
|
||||||
if not hasattr(shape, "text"):
|
if not hasattr(shape, "text"):
|
||||||
|
Loading…
Reference in New Issue
Block a user