Class DocumentModel

java.lang.Object
org.docx4j.model.structure.DocumentModel

public class DocumentModel extends Object
Forgetting about sub documents, a docx is made up of a number of sections, each with their own section properties (which define page dimensions, margins etc). So it is natural to think of a document in terms of sections. But since in Open XML, all sectPr elements - except the document level one - are hidden in paragraphs, our JAXB object model doesn't expose this structure. This class does that.
Author:
jharrop
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

  • Method Details

    • refresh

      public void refresh()
      If you have added/deleted sections from your WordprocessingMLPackage, you'll need to call this method in order for the changes to be reflected in the DocumentModel.
    • getSections

      public List<SectionWrapper> getSections()
      Returns:
      the sections