0
votes

I want to convert each page of document into separate word document. So i need to get every page of document. I am not able to differentiate pages in open xml format. So please move me to right direction.

 using (WordprocessingDocument document = WordprocessingDocument.Open("test.docx", true))
        {
            MainDocumentPart mainPart = document.MainDocumentPart;
}
1
you do this with code. Once youve given it a go and have some code to show us and a specific 'code related' problem then we can help youuser1645826
The OOXML dont have a page concept. Who draw the page breaks is the software that are consuming this xml (Word for exemple)... Because, if you want a "Print View" this make sense, but, if you want a "Web View", page breaks dont make senseBruno Croys Felthes
@Bruno.cf: I know that hence i asked this question.Shashi

1 Answers

1
votes

Based on the documentation here, The client uses LastRenderedPageBreak toidentify pages when its last saved. and the xml for it is:

<w:lastRenderedPageBreak/> 

I think you can use this to check and break pages unless the document you are working with is auto generated and haven't got any lastRenderedPageBreaks.

Also this approach will only work for documents with single column layouts. But with documents with multi column layouts looks like there are issues.