I am using python-docx to create a Word .docx in python and I would like to set the inside and outside margins as well as the gutter. How to do so?
Given a section I can set the left and right margins like this:
section.top_margin = Mm(6.6)
section.bottom_margin = Mm(6.6)
But how to set the inside and outside ones?
You can try like this :
I adjusted the top, bottom, left, and right margins by accessing the section.top_margin, section.bottom_margin, section.left_margin, and section.right_margin properties, respectively. To configure the inside and outside margins, I utilized the section.inside_margin and section.outside_margin properties. Lastly, I specified the gutter margin by utilizing the section.gutter property.