Improve image caption styling
This commit is contained in:
parent
7985b13cca
commit
0235406246
|
@ -209,6 +209,7 @@ public class WordBuilder {
|
||||||
XWPFParagraph captionParagraph = mainDocumentPart.createParagraph();
|
XWPFParagraph captionParagraph = mainDocumentPart.createParagraph();
|
||||||
captionParagraph.setAlignment(ParagraphAlignment.CENTER);
|
captionParagraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
captionParagraph.setSpacingBefore(0);
|
captionParagraph.setSpacingBefore(0);
|
||||||
|
captionParagraph.setStyle("Caption");
|
||||||
XWPFRun captionRun = captionParagraph.createRun();
|
XWPFRun captionRun = captionParagraph.createRun();
|
||||||
captionRun.setText("Image " + imageCount);
|
captionRun.setText("Image " + imageCount);
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue