Python docx library text align

后端 未结 2 1401
栀梦
栀梦 2021-01-19 15:16

I am using python docx library to manipulate a word document. However I can\'t find how to align a line to the center in the documents page of that library. I can\'t find by

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-19 15:46

    p = document.add_paragraph('A plain paragraph having some ',style='BodyText', breakbefore=False, jc='left')# @param string jc: Paragraph alignment, possible values:left, center, right, both (justified), ...
    

    for reference see this reference at def paragraph read the documentation

提交回复
热议问题