xml - Find a new page in a word document -
how identify new page, or identifier denotes pages number using python-docx? i've looked through docs no avail far , have tried looking wd_break.page attribute feature not yet support. appreciated thanks.
the short answer can't reliably determine soft page breaks .docx file. can identify hard page breaks , may able detect word broke pages last time "flowed" document.
a word document "flowed" document, meaning word's layout engine "flows" text of document page until runs out of room, creates new page flows remaining text. these "soft" page breaks not specified in .docx file; determined word @ time of rendering, either display or printing. makes sense because whenever change, example, margins, pages may break @ different locations.
an implication of .docx file not contain markup identifying following text should flow onto new page.
a hard page break 1 explicitly inserted document author cause following content flow new page without regard whether current page full. these implemnted using break element, within run believe, , can detected.
as aid assistive technologies, voice reader visually impaired, word may insert <w:lastrenderedpagebreak>
elements. don't know these , under circumstances word inserts these, might avenue worth exploring.
Comments
Post a Comment