jdum / odfdo

python library for OpenDocument format (ODF)
Apache License 2.0
48 stars 11 forks source link

page break #9

Closed OtharSmirnow closed 4 years ago

OtharSmirnow commented 4 years ago

hi, I can't find the way to insert a page break. Is there already a function for this as paragraph does not accept doc.body.append(Paragraph("\u000C")) https://www.fileformat.info/info/unicode/char/000c/index.htm

jdum commented 4 years ago

hi, maybe the tag: , see http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-text_soft-page-break however not implemented as keyword (because very uncommon), so use with: Element.from_tag("").

Or what you need is probably:

sorry, there is no simple answer to that question.

OtharSmirnow commented 4 years ago

document.body.append(Paragraph('', style='breakPageAfter'))

style defined in style_document

did the trick Thank you