How to access OpenXML content by page number?

前端 未结 4 1380
悲&欢浪女
悲&欢浪女 2020-12-03 22:57

Using OpenXML, can I read the document content by page number?

wordDocument.MainDocumentPart.Document.Body gives content of full document.



        
4条回答
  •  再見小時候
    2020-12-03 23:26

    List Allparagraphs = wp.MainDocumentPart.Document.Body.OfType().ToList();

    List PageParagraphs = Allparagraphs.Where (x=>x.Descendants().Count() ==1) .Select(x => x).Distinct().ToList();

提交回复
热议问题