How to access OpenXML content by page number?

前端 未结 4 1379
悲&欢浪女
悲&欢浪女 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:38

    Rename docx to zip. Open docProps\app.xml file. :

     
    
      
      0
      1
      141
      809
      Microsoft Office Word
      0
      6
      1
      false
      
        
          
            Название
          
          
            1
          
        
      
      
        
          
        
      
      
      false
      949
      false
      false
      14.0000
    
    

    OpenXML lib reads wordDocument.ExtendedFilePropertiesPart.Properties.Pages.Text from 1 property . This properies are created only by winword application. if word document changed wordDocument.ExtendedFilePropertiesPart.Properties.Pages.Text is not actual. if word document created programmatically the wordDocument.ExtendedFilePropertiesPart is offten null.

提交回复
热议问题