请问一下,想标题的序号想设置成下面这种,应该如何操作(无序号和有序号交替当作标题)
1.aaaa
bbbb
2.ccccc
Document doc = new Document();
Section section = doc.addSection();
Paragraph paragraph = section.addParagraph();
paragraph.appendText("aaa");
paragraph.getListFormat().applyNumberedStyle();
paragraph.applyStyle(BuiltinStyle.Heading_1);
PdfUnitConvertor convertor = new PdfUnitConvertor();
float point = convertor.convertUnits(0.63F, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point);
paragraph = section.addParagraph();
paragraph.appendText("bbb");
paragraph.applyStyle(BuiltinStyle.Heading_1);
paragraph.getFormat().setLeftIndent(point);
paragraph = section.addParagraph();
paragraph.appendText("ccc");
paragraph.applyStyle(BuiltinStyle.Heading_1);
paragraph.getListFormat().applyNumberedStyle();
doc.saveToFile("out.docx", FileFormat.Docx_2013);
PdfUnitConvertor convertor = new PdfUnitConvertor();
float point = convertor.convertUnits(0.63F, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point);