Can I add a SECTION_BREAK in a paragraph?

my code is

ParagraphCollection paragraphCollection = section.getBody().getParagraphs();
if (formattingProcessShareVar.getShapeCount() > 0)
{
    Paragraph paragraph = new Paragraph(doc);
    paragraphCollection.add(paragraph);
    paragraph.appendField("TOC \\h \\z \\c \"图\"");
}
// 创建一个新段落用于插入换页符
Paragraph pageBreakParagraph = new Paragraph(doc);

pageBreakParagraph.appendChild(new Run(doc, ControlChar.SECTION_BREAK));

paragraphCollection.add(pageBreakParagraph);

Paragraph tableTitlePara = new Paragraph(doc);
paragraphCollection.add(tableTitlePara);
tableTitlePara.getRuns().add(new Run(doc, "附表清单"));

however, pageBreakParagraph.appendChild(new Run(doc, ControlChar.SECTION_BREAK)); didn’t work. the result is a PageBreak. Is this a restrictiver controlChar that can be only used in Section ?

@Madecho Section break is not a simple character. If you need to insert a section break you should use DocumentBuilder.insertBreak method. Please try modifying your code like the following:

DocumentBuilder builder = new DocumentBuilder(doc);
Paragraph pageBreakParagraph = new Paragraph(doc);
paragraphCollection.add(pageBreakParagraph);
builder.moveTo(pageBreakParagraph);
builder.insertBreak(BreakType.SECTION_BREAK_NEW_PAGE);