我正在使用python-docx
在python
中創建一個單詞.docx
,我想設置inside
和outside
的邊距以及gutter
。如何做到這一點?
給定section
,我可以這樣設置左右邊距:
section.top_margin = Mm(6.6)
section.bottom_margin = Mm(6.6)
但是如何設置內部和外部的?
我正在使用python-docx
在python
中創建一個單詞.docx
,我想設置inside
和outside
的邊距以及gutter
。如何做到這一點?
給定section
,我可以這樣設置左右邊距:
section.top_margin = Mm(6.6)
section.bottom_margin = Mm(6.6)
但是如何設置內部和外部的?
公眾號:1024技術圈
?? 提供互聯網知識和資訊,分享IT前沿技術,熱門資源,大廠面試題 ??
你可以這樣嘗試:
我通過分別訪問section.top_margin、section.bottom_margin、{+16}和section.right_margin屬性來調整上、下、左和右頁邊距。為了配置內部和外部邊距,我使用了section.inside_margin和section.outside_margin屬性。最后,我使用section.gutter屬性指定了邊溝邊距。