mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
Handle header and footer
Signed-off-by: SimJeg <sjegou@nvidia.com>
This commit is contained in:
parent
1033c25435
commit
61bd559f78
@ -116,7 +116,9 @@ class MsWordDocumentBackend(DeclarativeDocumentBackend):
|
||||
doc = DoclingDocument(name=self.file.stem or "file", origin=origin)
|
||||
if self.is_valid():
|
||||
assert self.docx_obj is not None
|
||||
doc = self.walk_linear(self.docx_obj.sections[0].header._element, self.docx_obj, doc)
|
||||
doc = self.walk_linear(self.docx_obj.element.body, self.docx_obj, doc)
|
||||
doc = self.walk_linear(self.docx_obj.sections[-1].footer._element, self.docx_obj, doc)
|
||||
return doc
|
||||
else:
|
||||
raise RuntimeError(
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user