From 5b5904c354f1b80ac7a3c5c5c06ece127037525d Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 20 Jun 2026 03:37:30 +0000 Subject: [PATCH] Fix cover page: use WD_BREAK.PAGE for page break --- scraibe/docx_cover.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scraibe/docx_cover.py b/scraibe/docx_cover.py index 6624b13..180f978 100644 --- a/scraibe/docx_cover.py +++ b/scraibe/docx_cover.py @@ -57,9 +57,10 @@ def _add_blank_lines(doc: Document, count: int): def _add_page_break(doc: Document): """Insert a page break after the last paragraph (no extra blank line).""" + from docx.enum.text import WD_BREAK last_p = doc.paragraphs[-1] run = last_p.add_run() - run.add_break(type=1) # WD_BREAK.PAGE = 1 + run.add_break(WD_BREAK.PAGE) def add_cover_page(