Skip to content

Commit 587e67f

Browse files
fix: propagate HTMLOutputStyle properly through (#246)
fix to propagate HTMLOutputStyle properly through Signed-off-by: Peter Staar <[email protected]>
1 parent 5d40600 commit 587e67f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docling_core/types/doc/document.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3154,6 +3154,7 @@ def export_to_html( # noqa: C901
31543154
r"""Serialize to HTML."""
31553155
from docling_core.experimental.serializer.html import (
31563156
HTMLDocSerializer,
3157+
HTMLOutputStyle,
31573158
HTMLParams,
31583159
)
31593160

@@ -3164,6 +3165,10 @@ def export_to_html( # noqa: C901
31643165
else DEFAULT_CONTENT_LAYERS
31653166
)
31663167

3168+
output_style = HTMLOutputStyle.SINGLE_COLUMN
3169+
if split_page_view:
3170+
output_style = HTMLOutputStyle.SPLIT_PAGE
3171+
31673172
params = HTMLParams(
31683173
labels=my_labels,
31693174
layers=my_layers,
@@ -3174,7 +3179,7 @@ def export_to_html( # noqa: C901
31743179
formula_to_mathml=formula_to_mathml,
31753180
html_head=html_head,
31763181
html_lang=html_lang,
3177-
split_page_view=split_page_view,
3182+
output_style=output_style,
31783183
)
31793184

31803185
if html_head == "null":

0 commit comments

Comments
 (0)