【发布时间】:2014-08-08 03:07:30
【问题描述】:
我有一段文本希望出现在文档的中心。我怎样才能在 docx4j 中做到这一点?我目前正在使用:
PPr paragraphProperties = factory.createPPr();
//creating the alignment
TextAlignment align = new TextAlignment();
align.setVal("center");
paragraphProperties.setTextAlignment(align);
//centering the paragraph
paragraph.setPPr(paragraphProperties);
但它不起作用。
【问题讨论】: