Package com.independentsoft.office.word

# Class WordDocument

java.lang.Object
com.independentsoft.office.OfficeDocument
com.independentsoft.office.word.WordDocument

public class WordDocument extends OfficeDocument
The Class WordDocument.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.OfficeDocument

  `applicationProperty, contentTypeTable, coreProperty, customFileTable, customProperties, documentRelationship, inputFileTable, macro, mainDocumentFileName, mainDocumentFolderName, outputStream, packageRelationship, theme, utf8`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WordDocument()`
  Instantiates a new word document.
  `WordDocument​(InputStream inputStream)`
  Instantiates a new word document.
  `WordDocument​(String file)`
  Instantiates a new word document.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appendHtml​(String htmlContent)`
  Append HTML content to the existing document.
  `WordDocument`
  `clone()`
  `Background`
  `getBackground()`
  Gets the background.
  `Body`
  `getBody()`
  Gets the body.
  `byte[]`
  `getBytes()`
  Gets the bytes.
  `List<Comment>`
  `getComments()`
  Gets the comments.
  `List<IContentElement>`
  `getContentElements()`
  Gets the content elements.
  `List<Endnote>`
  `getEndnotes()`
  Gets the endnotes.
  `List<Field>`
  `getFields()`
  Gets the fields.
  `List<Font>`
  `getFonts()`
  Gets the fonts.
  `HashMap<String,​Footer>`
  `getFooterTable()`
  Gets the footer table.
  `List<Footnote>`
  `getFootnotes()`
  Gets the footnotes.
  `GlossaryDocument`
  `getGlossaryDocument()`
  Gets the glossary document.
  `HashMap<String,​Header>`
  `getHeaderTable()`
  Gets the header table.
  `String`
  `getHtml()`
  Get HTML representation of the document.
  `InputStream`
  `getInputStream()`
  Gets the input stream.
  `String`
  `getMarkdown()`
  Get Markdown representation of the document.
  `String`
  `getMarkupCompatibilityIgnorable()`
  Gets the mc:Ignorable attribute value of the document root, or `null` if absent.
  `NumberingDefinitions`
  `getNumberingDefinitions()`
  Gets the numbering definitions.
  `List<Paragraph>`
  `getParagraphs()`
  Gets the paragraphs.
  `List<IPicture>`
  `getPictures()`
  Gets the pictures.
  `String`
  `getRtf()`
  Get RTF representation of the document.
  `List<Run>`
  `getRuns()`
  Gets the runs.
  `List<Section>`
  `getSections()`
  Gets the sections.
  `Settings`
  `getSettings()`
  Gets the settings.
  `StyleDefinitions`
  `getStyleDefinitions()`
  Gets the style definitions.
  `List<Table>`
  `getTables()`
  Gets the tables.
  `List<Text>`
  `getTexts()`
  Gets the texts.
  `Theme`
  `getTheme()`
  Gets the document theme.
  `WebSettings`
  `getWebSettings()`
  Gets the web settings.
  `void`
  `importHtml​(String htmlContent)`
  Import HTML string content and convert it to Word document structure.
  `boolean`
  `isMacroEnabled()`
  Checks if is macro enabled.
  `boolean`
  `isTemplate()`
  Checks if is template.
  `void`
  `loadFromDoc​(InputStream stream)`
  Loads a DOC document from a stream.
  `void`
  `loadFromDoc​(String file)`
  Loads a DOC (Microsoft Word 97-2003 binary format) document and reconstructs its content (text, character/paragraph formatting, styles, tables, fields and embedded PNG/JPEG images) into this document.
  `void`
  `loadFromHtml​(InputStream inputStream)`
  Load HTML content from an input stream and convert it to Word document structure.
  `void`
  `loadFromHtml​(String filePath)`
  Load HTML content from a file and convert it to Word document structure.
  `void`
  `loadFromRtf​(InputStream stream)`
  Loads an RTF document from a stream.
  `void`
  `loadFromRtf​(String file)`
  Loads an RTF (Rich Text Format) document and reconstructs its content (text, character/paragraph formatting, tables and embedded PNG/JPEG images) into this document.
  `void`
  `loadFromRtfString​(String rtfContent)`
  Loads an RTF document from an RTF markup string.
  `void`
  `open​(InputStream inputStream)`
  Open.
  `void`
  `open​(String filePath)`
  Open.
  `protected void`
  `openImplementation​(InputStream inputStream)`
  `void`
  `replace​(String text, Run run)`
  Replace.
  `void`
  `replace​(String text, Run run, ReplaceIn replaceIn)`
  Replace.
  `void`
  `replace​(String oldText, String newText)`
  Replace.
  `void`
  `replace​(String oldText, String newText, ReplaceIn replaceIn)`
  Replace.
  `void`
  `replace​(String text, List<Run> runs)`
  Replace.
  `void`
  `replace​(String text, List<Run> runs, ReplaceIn replaceIn)`
  Replace.
  `void`
  `replace​(List<String> oldText, List<String> newText)`
  Replace.
  `void`
  `replace​(List<String> oldText, List<String> newText, ReplaceIn replaceIn)`
  Replace.
  `void`
  `save​(OutputStream outputStream)`
  Save.
  `void`
  `save​(String filePath)`
  Save.
  `void`
  `save​(String filePath, boolean overwrite)`
  Save.
  `void`
  `saveAsHtml​(OutputStream outputStream)`
  Save the document as HTML to the specified output stream.
  `void`
  `saveAsHtml​(String filePath)`
  Save the document as HTML to the specified file path.
  `void`
  `saveAsHtml​(String filePath, boolean overwrite)`
  Save the document as HTML to the specified file path.
  `void`
  `saveAsMarkdown​(OutputStream outputStream)`
  Save the document as Markdown to the specified output stream.
  `void`
  `saveAsMarkdown​(String filePath)`
  Save the document as Markdown to the specified file path.
  `void`
  `saveAsMarkdown​(String filePath, boolean overwrite)`
  Save the document as Markdown to the specified file path.
  `void`
  `saveAsPdf​(OutputStream outputStream)`
  Save the document as PDF to the specified output stream.
  `void`
  `saveAsPdf​(OutputStream outputStream, PdfSaveOptions options)`
  Save the document as PDF to the specified output stream.
  `void`
  `saveAsPdf​(String filePath)`
  Save the document as PDF to the specified file path.
  `void`
  `saveAsPdf​(String filePath, boolean overwrite)`
  Save the document as PDF to the specified file path.
  `void`
  `saveAsPdf​(String filePath, boolean overwrite, PdfSaveOptions options)`
  Save the document as PDF to the specified file path.
  `void`
  `saveAsPdf​(String filePath, PdfSaveOptions options)`
  Save the document as PDF to the specified file path.
  `void`
  `saveAsRtf​(OutputStream outputStream)`
  Save the document as RTF to the specified output stream.
  `void`
  `saveAsRtf​(String filePath)`
  Save the document as RTF to the specified file path.
  `void`
  `saveAsRtf​(String filePath, boolean overwrite)`
  Save the document as RTF to the specified file path.
  `void`
  `setBackground​(Background background)`
  Sets the background.
  `void`
  `setGlossaryDocument​(GlossaryDocument glossaryDocument)`
  Sets the glossary document.
  `void`
  `setMacroEnabled​(boolean isMacroEnabled)`
  Sets the macro enabled.
  `void`
  `setMarkupCompatibilityIgnorable​(String markupCompatibilityIgnorable)`
  Sets the mc:Ignorable attribute value of the document root.
  `void`
  `setNumberingDefinitions​(NumberingDefinitions numberingDefinitions)`
  Sets the numbering definitions.
  `void`
  `setStyleDefinitions​(StyleDefinitions styleDefinitions)`
  Sets the style definitions.
  `void`
  `setTemplate​(boolean isTemplate)`
  Sets the template.
  `String`
  `toString()`
  `String`
  `toText()`
  To text.

  ### Methods inherited from class com.independentsoft.office.OfficeDocument

  `addFile, addFile, getApplicationName, getApplicationVersion, getCategory, getCharacterCount, getCompany, getContentStatus, getContentType, getContentTypeTable, getCreated, getCreator, getCustomFileTable, getCustomProperties, getDescription, getDigitalSignature, getDocumentSecurity, getHeadingPairs, getHiddenSlideCount, getHyperlinkList, getIdentifier, getInputFileTable, getKeywords, getLanguage, getLastCharacterCount, getLastModifiedBy, getLastPrinted, getLineCount, getMacro, getMainDocumentFolderName, getManager, getModified, getMultimediaClipCount, getNoteCount, getPageCount, getParagraphCount, getPartTitles, getPresentationFormat, getRelativeHyperlinkBase, getRevision, getSubject, getTemplateName, getTitle, getTotalTime, getVersion, getWordCount, hasEnableScaling, hasHyperlinksChanged, hasLinksUpToDate, isSharedDocument, setApplicationName, setApplicationVersion, setCategory, setCharacterCount, setCompany, setContentStatus, setContentType, setCreated, setCreator, setDescription, setDigitalSignature, setDocumentSecurity, setEnableScaling, setHeadingPairs, setHiddenSlideCount, setHyperlinkList, setHyperlinksChanged, setIdentifier, setKeywords, setLanguage, setLastCharacterCount, setLastModifiedBy, setLastPrinted, setLineCount, setLinksUpToDate, setMacro, setManager, setModified, setMultimediaClipCount, setNoteCount, setPageCount, setParagraphCount, setPartTitles, setPresentationFormat, setRelativeHyperlinkBase, setRevision, setSharedDocument, setSubject, setTemplateName, setTheme, setTitle, setTotalTime, setVersion, setWordCount`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### WordDocument

    public WordDocument()
    Instantiates a new word document.

  - ### WordDocument

    public WordDocument​(String file) throws IOException, XMLStreamException
    Instantiates a new word document.
    Parameters:
      `file` - the file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.
      `XMLStreamException` - the xML stream exception

  - ### WordDocument

    public WordDocument​(InputStream inputStream) throws IOException, XMLStreamException
    Instantiates a new word document.
    Parameters:
      `inputStream` - the input stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### open

    public void open​(String filePath) throws IOException, XMLStreamException
    Description copied from class: `OfficeDocument`
    Open.
    Specified by:
      `open` in class `OfficeDocument`
    Parameters:
      `filePath` - the file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.
      `XMLStreamException` - the xML stream exception

  - ### open

    public void open​(InputStream inputStream) throws IOException, XMLStreamException
    Description copied from class: `OfficeDocument`
    Open.
    Specified by:
      `open` in class `OfficeDocument`
    Parameters:
      `inputStream` - the stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.
      `XMLStreamException` - the xML stream exception

  - ### loadFromDoc

    public void loadFromDoc​(String file) throws IOException
    Loads a DOC (Microsoft Word 97-2003 binary format) document and reconstructs its content (text, character/paragraph formatting, styles, tables, fields and embedded PNG/JPEG images) into this document.
    Parameters:
      `file` - the DOC file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### loadFromDoc

    public void loadFromDoc​(InputStream stream) throws IOException
    Loads a DOC document from a stream. See `loadFromDoc(String)`.
    Parameters:
      `stream` - the DOC stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### loadFromRtf

    public void loadFromRtf​(String file) throws IOException
    Loads an RTF (Rich Text Format) document and reconstructs its content (text, character/paragraph formatting, tables and embedded PNG/JPEG images) into this document.
    Parameters:
      `file` - the RTF file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### loadFromRtf

    public void loadFromRtf​(InputStream stream) throws IOException
    Loads an RTF document from a stream. See `loadFromRtf(String)`.
    Parameters:
      `stream` - the RTF stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### loadFromRtfString

    public void loadFromRtfString​(String rtfContent)
    Loads an RTF document from an RTF markup string.
    Parameters:
      `rtfContent` - the RTF markup

  - ### openImplementation

    protected void openImplementation​(InputStream inputStream) throws IOException, XMLStreamException
    Overrides:
      `openImplementation` in class `OfficeDocument`
    Throws:
      `IOException`
      `XMLStreamException`

  - ### save

    public void save​(String filePath) throws IOException
    Description copied from class: `OfficeDocument`
    Save.
    Specified by:
      `save` in class `OfficeDocument`
    Parameters:
      `filePath` - the file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### save

    public void save​(String filePath, boolean overwrite) throws IOException
    Description copied from class: `OfficeDocument`
    Save.
    Specified by:
      `save` in class `OfficeDocument`
    Parameters:
      `filePath` - the file
      `overwrite` - the overwrite
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### save

    public void save​(OutputStream outputStream) throws IOException
    Description copied from class: `OfficeDocument`
    Save.
    Specified by:
      `save` in class `OfficeDocument`
    Parameters:
      `outputStream` - the stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsHtml

    public void saveAsHtml​(String filePath) throws IOException
    Save the document as HTML to the specified file path.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsHtml

    public void saveAsHtml​(String filePath, boolean overwrite) throws IOException
    Save the document as HTML to the specified file path.
    Parameters:
      `filePath` - the file path
      `overwrite` - whether to overwrite existing file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsHtml

    public void saveAsHtml​(OutputStream outputStream) throws IOException
    Save the document as HTML to the specified output stream.
    Parameters:
      `outputStream` - the output stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getHtml

    public String getHtml()
    Get HTML representation of the document.
    Returns:
      HTML string representation of the document

  - ### saveAsPdf

    public void saveAsPdf​(String filePath) throws IOException
    Save the document as PDF to the specified file path.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsPdf

    public void saveAsPdf​(String filePath, PdfSaveOptions options) throws IOException
    Save the document as PDF to the specified file path.
    Parameters:
      `filePath` - the file path
      `options` - the PDF export options
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsPdf

    public void saveAsPdf​(String filePath, boolean overwrite) throws IOException
    Save the document as PDF to the specified file path.
    Parameters:
      `filePath` - the file path
      `overwrite` - whether to overwrite existing file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsPdf

    public void saveAsPdf​(String filePath, boolean overwrite, PdfSaveOptions options) throws IOException
    Save the document as PDF to the specified file path.
    Parameters:
      `filePath` - the file path
      `overwrite` - whether to overwrite existing file
      `options` - the PDF export options
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsPdf

    public void saveAsPdf​(OutputStream outputStream) throws IOException
    Save the document as PDF to the specified output stream.
    Parameters:
      `outputStream` - the output stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsPdf

    public void saveAsPdf​(OutputStream outputStream, PdfSaveOptions options) throws IOException
    Save the document as PDF to the specified output stream.
    Parameters:
      `outputStream` - the output stream
      `options` - the PDF export options
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsRtf

    public void saveAsRtf​(String filePath) throws IOException
    Save the document as RTF to the specified file path.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsRtf

    public void saveAsRtf​(String filePath, boolean overwrite) throws IOException
    Save the document as RTF to the specified file path.
    Parameters:
      `filePath` - the file path
      `overwrite` - whether to overwrite existing file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsRtf

    public void saveAsRtf​(OutputStream outputStream) throws IOException
    Save the document as RTF to the specified output stream.
    Parameters:
      `outputStream` - the output stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getRtf

    public String getRtf()
    Get RTF representation of the document.
    Returns:
      RTF string representation of the document

  - ### saveAsMarkdown

    public void saveAsMarkdown​(String filePath) throws IOException
    Save the document as Markdown to the specified file path.
    Parameters:
      `filePath` - the file path
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsMarkdown

    public void saveAsMarkdown​(String filePath, boolean overwrite) throws IOException
    Save the document as Markdown to the specified file path.
    Parameters:
      `filePath` - the file path
      `overwrite` - whether to overwrite existing file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### saveAsMarkdown

    public void saveAsMarkdown​(OutputStream outputStream) throws IOException
    Save the document as Markdown to the specified output stream.
    Parameters:
      `outputStream` - the output stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getMarkdown

    public String getMarkdown()
    Get Markdown representation of the document.
    Returns:
      Markdown string representation of the document

  - ### loadFromHtml

    public void loadFromHtml​(String filePath) throws IOException
    Load HTML content from a file and convert it to Word document structure. This replaces the current document content.
    Parameters:
      `filePath` - the path to the HTML file
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### loadFromHtml

    public void loadFromHtml​(InputStream inputStream) throws IOException
    Load HTML content from an input stream and convert it to Word document structure. This replaces the current document content.
    Parameters:
      `inputStream` - the input stream containing HTML content
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### importHtml

    public void importHtml​(String htmlContent)
    Import HTML string content and convert it to Word document structure. This replaces the current document content.
    Parameters:
      `htmlContent` - the HTML content string

  - ### appendHtml

    public void appendHtml​(String htmlContent)
    Append HTML content to the existing document.
    Parameters:
      `htmlContent` - the HTML content string to append

  - ### getInputStream

    public InputStream getInputStream() throws IOException
    Description copied from class: `OfficeDocument`
    Gets the input stream.
    Specified by:
      `getInputStream` in class `OfficeDocument`
    Returns:
      the input stream
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getBytes

    public byte[] getBytes() throws IOException
    Description copied from class: `OfficeDocument`
    Gets the bytes.
    Specified by:
      `getBytes` in class `OfficeDocument`
    Returns:
      the bytes
    Throws:
      `IOException` - Signals that an I/O exception has occurred.

  - ### getFields

    public List<Field> getFields()
    Gets the fields.
    Returns:
      the fields

  - ### getSections

    public List<Section> getSections()
    Gets the sections.
    Returns:
      the sections

  - ### getTables

    public List<Table> getTables()
    Gets the tables.
    Returns:
      the tables

  - ### getParagraphs

    public List<Paragraph> getParagraphs()
    Gets the paragraphs.
    Returns:
      the paragraphs

  - ### getRuns

    public List<Run> getRuns()
    Gets the runs.
    Returns:
      the runs

  - ### getTexts

    public List<Text> getTexts()
    Gets the texts.
    Returns:
      the texts

  - ### getPictures

    public List<IPicture> getPictures()
    Gets the pictures.
    Returns:
      the pictures

  - ### replace

    public void replace​(String oldText, String newText)
    Replace.
    Parameters:
      `oldText` - the old text
      `newText` - the new text

  - ### replace

    public void replace​(String oldText, String newText, ReplaceIn replaceIn)
    Replace.
    Parameters:
      `oldText` - the old text
      `newText` - the new text
      `replaceIn` - the replace in

  - ### replace

    public void replace​(List<String> oldText, List<String> newText)
    Replace.
    Parameters:
      `oldText` - the old text
      `newText` - the new text

  - ### replace

    public void replace​(List<String> oldText, List<String> newText, ReplaceIn replaceIn)
    Replace.
    Parameters:
      `oldText` - the old text
      `newText` - the new text
      `replaceIn` - the replace in

  - ### replace

    public void replace​(String text, Run run)
    Replace.
    Parameters:
      `text` - the text
      `run` - the run

  - ### replace

    public void replace​(String text, Run run, ReplaceIn replaceIn)
    Replace.
    Parameters:
      `text` - the text
      `run` - the run
      `replaceIn` - the replace in

  - ### replace

    public void replace​(String text, List<Run> runs)
    Replace.
    Parameters:
      `text` - the text
      `runs` - the runs

  - ### replace

    public void replace​(String text, List<Run> runs, ReplaceIn replaceIn)
    Replace.
    Parameters:
      `text` - the text
      `runs` - the runs
      `replaceIn` - the replace in

  - ### getContentElements

    public List<IContentElement> getContentElements()
    Gets the content elements.
    Returns:
      the content elements

  - ### clone

    public WordDocument clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toText

    public String toText()
    To text.
    Returns:
      the string

  - ### isTemplate

    public boolean isTemplate()
    Checks if is template.
    Returns:
      true, if is template

  - ### setTemplate

    public void setTemplate​(boolean isTemplate)
    Sets the template.
    Parameters:
      `isTemplate` - the new template

  - ### isMacroEnabled

    public boolean isMacroEnabled()
    Checks if is macro enabled.
    Returns:
      true, if is macro enabled

  - ### setMacroEnabled

    public void setMacroEnabled​(boolean isMacroEnabled)
    Sets the macro enabled.
    Parameters:
      `isMacroEnabled` - the new macro enabled

  - ### getBody

    public Body getBody()
    Gets the body.
    Returns:
      the body

  - ### getMarkupCompatibilityIgnorable

    public String getMarkupCompatibilityIgnorable()
    Gets the mc:Ignorable attribute value of the document root, or `null` if absent.
    Returns:
      the markup-compatibility ignorable prefixes

  - ### setMarkupCompatibilityIgnorable

    public void setMarkupCompatibilityIgnorable​(String markupCompatibilityIgnorable)
    Sets the mc:Ignorable attribute value of the document root.
    Parameters:
      `markupCompatibilityIgnorable` - the new value

  - ### getGlossaryDocument

    public GlossaryDocument getGlossaryDocument()
    Gets the glossary document.
    Returns:
      the glossary document

  - ### setGlossaryDocument

    public void setGlossaryDocument​(GlossaryDocument glossaryDocument)
    Sets the glossary document.
    Parameters:
      `glossaryDocument` - the new glossary document

  - ### getBackground

    public Background getBackground()
    Gets the background.
    Returns:
      the background

  - ### setBackground

    public void setBackground​(Background background)
    Sets the background.
    Parameters:
      `background` - the new background

  - ### getStyleDefinitions

    public StyleDefinitions getStyleDefinitions()
    Gets the style definitions.
    Returns:
      the style definitions

  - ### setStyleDefinitions

    public void setStyleDefinitions​(StyleDefinitions styleDefinitions)
    Sets the style definitions.
    Parameters:
      `styleDefinitions` - the new style definitions

  - ### getNumberingDefinitions

    public NumberingDefinitions getNumberingDefinitions()
    Gets the numbering definitions.
    Returns:
      the numbering definitions

  - ### setNumberingDefinitions

    public void setNumberingDefinitions​(NumberingDefinitions numberingDefinitions)
    Sets the numbering definitions.
    Parameters:
      `numberingDefinitions` - the new numbering definitions

  - ### getFonts

    public List<Font> getFonts()
    Gets the fonts.
    Returns:
      the fonts

  - ### getSettings

    public Settings getSettings()
    Gets the settings.
    Returns:
      the settings

  - ### getWebSettings

    public WebSettings getWebSettings()
    Gets the web settings.
    Returns:
      the web settings

  - ### getComments

    public List<Comment> getComments()
    Gets the comments.
    Returns:
      the comments

  - ### getFootnotes

    public List<Footnote> getFootnotes()
    Gets the footnotes.
    Returns:
      the footnotes

  - ### getEndnotes

    public List<Endnote> getEndnotes()
    Gets the endnotes.
    Returns:
      the endnotes

  - ### getFooterTable

    public HashMap<String,​Footer> getFooterTable()
    Gets the footer table.
    Returns:
      the footer table

  - ### getHeaderTable

    public HashMap<String,​Header> getHeaderTable()
    Gets the header table.
    Returns:
      the header table

  - ### getTheme

    public Theme getTheme()
    Gets the document theme.
    Overrides:
      `getTheme` in class `OfficeDocument`
    Returns:
      the theme