klyn.io.docx.DocxDocument.DocxDocument
constructor
public DocxDocument(path as Path)
Description

Opens a Word document (.docx) from a Path object.

Parameters
ParameterDescription
pathSource file path.
Throws
  • IOException If reading the file fails.
  • DocxException If the file is not a valid OpenXML Word document.
Example
try doc = DocxDocument(Path("spec.docx")):
    print(doc.getText())