简体   繁体   English

OpenXML Word文档拆分

[英]OpenXML Word Document Split

I need help in splitting the word document using OpenXML. 我需要帮助使用OpenXML拆分word文档。 I am trying to split the large word document into multiple word documents with single page in each document. 我试图将大单词文档拆分成多个单词文档,每个文档中都有单页。 I have to split the word document using OpenXML SDK 2.5 (no third party dlls are allowed). 我必须使用OpenXML SDK 2.5拆分word文档(不允许使用第三方dll)。 Documents after splitting should contains all the styling and formatting present in original document. 拆分后的文档应包含原始文档中存在的所有样式和格式。

Pages do not exist in the OpenXML format until they are rendered by a word processor. 在由文字处理器呈现页面之前,页面不存在于OpenXML格式中。

The document may contain <w:lastRenderedPageBreak/> nodes, which hint at where page breaks occurred the last time the document was rendered though not necessarily where the page break will always occur . 该文档可能包含<w:lastRenderedPageBreak/>节点,这些节点提示在上次呈现文档时发生分页符的位置,但不一定是总是会发生分页符的位置

If you have control over the construction of the documents, you can use inline notations to mark where you want to split. 如果您可以控制文档的构造,则可以使用内联符号来标记要拆分的位置。 For instance, its a straightforward operation to locate and segment on heading levels to split a document of chapters into chapter documents. 例如,它是一个简单的操作,用于定位和分割标题级别,以将章节文档拆分为章节文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM