I am trying to change the page orientation to landscape using Quarto when generating docx (based on this SO). Although it changes the orientation, the footer is misplaced.
In the document which is generated by quarto (see screenshot), there is a footer in page 5 but the same footer is missed in all other pages. Also, one can notice there are arbitrary number of sections. How can I make that footer reflect in all pages (including dynamic page numbers)?
Below is the code I tried,
from docx import Document
document = Document(r"C:\dev\poetry-demo\poetry_demo\test.docx")
n_sections = len(document.sections)
document.sections[0].footer = document.sections[n_sections].footer
# Attribute error
Note: Quarto works based on template and I can extract the footer.xml
from it. Hence, I am okay if one can apply that ooxml
for all sections.