I need to replace ControlChar.SECTION_BREAK to ControlChar.PAGE_BREAK.
This is my old code. In this below code section breack are removed from docment. Now, we want to replace section break to page break.
for (int i = doc.getSections().getCount() - 2; i >= 0; i--) {
doc.getLastSection().prependContent(interimdoc.getSections().get((i)));
doc.getSections().get(i).remove();
doc.save(interim);