50,547
社区成员
发帖
与我相关
我的任务
分享
import com.spire.doc.*;
import com.spire.doc.documents.BreakType;
public class AddPagebreak {
public static void main(String[] args){
Document doc = new Document("test.docx");
Section sec= doc.getSections().get(0);
sec.getParagraphs().get(3).appendBreak(BreakType.Page_Break);
doc.saveToFile("result.docx",FileFormat.Docx_2010);
}
}