mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
handle none notes_text_frame
This commit is contained in:
parent
6613b9e98b
commit
1b401a4730
@ -423,18 +423,19 @@ class MsPowerpointDocumentBackend(DeclarativeDocumentBackend, PaginatedDocumentB
|
|||||||
# Handle notes slide
|
# Handle notes slide
|
||||||
if slide.has_notes_slide:
|
if slide.has_notes_slide:
|
||||||
notes_slide = slide.notes_slide
|
notes_slide = slide.notes_slide
|
||||||
notes_text = notes_slide.notes_text_frame.text.strip()
|
if notes_slide.notes_text_frame is not None:
|
||||||
if notes_text:
|
notes_text = notes_slide.notes_text_frame.text.strip()
|
||||||
bbox = BoundingBox(l=0, t=0, r=0, b=0)
|
if notes_text:
|
||||||
prov = ProvenanceItem(
|
bbox = BoundingBox(l=0, t=0, r=0, b=0)
|
||||||
page_no=slide_ind + 1, charspan=[0, len(notes_text)], bbox=bbox
|
prov = ProvenanceItem(
|
||||||
)
|
page_no=slide_ind + 1, charspan=[0, len(notes_text)], bbox=bbox
|
||||||
doc.add_text(
|
)
|
||||||
label=DocItemLabel.TEXT,
|
doc.add_text(
|
||||||
parent=parent_slide,
|
label=DocItemLabel.TEXT,
|
||||||
text=notes_text,
|
parent=parent_slide,
|
||||||
prov=prov,
|
text=notes_text,
|
||||||
content_layer=ContentLayer.FURNITURE,
|
prov=prov,
|
||||||
)
|
content_layer=ContentLayer.FURNITURE,
|
||||||
|
)
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
Loading…
Reference in New Issue
Block a user