1 使用详解
(1)InsertNode()
说明:在当前位置插入元素。
格式:public void InsertNode(Node node);
(2)MoveToDocumentEnd()
说明:移动至文档末尾。
格式:public void MoveToDocumentEnd();
2 实现代码
在文档末尾插入分页符。
Document doc=new Document("test.doc");
DocumentBuilder builder =new DocumentBuiler();
//移动至文档结尾
builder.ToDocumentEnd();
//新建分页符
Run pageBreakRun = new Run(doc, ControlChar.PageBreak);
//插入分页符
builder.InsertNode(pageBreakRun);