Table of Contents
Uniword uses sensible defaults and requires no configuration for typical use. When you need to adjust behavior, the options below are available.
1. Format detection
DocumentFactory.from_file auto-detects the file format from the extension.
Pass the format: keyword to override:
# Auto-detect (default)
doc = Uniword::DocumentFactory.from_file("document.docx")
# Explicit format
doc = Uniword::DocumentFactory.from_file("document.bin", format: :docx)
Supported formats:
-
:docx— Office Open XML (Word 2007+) -
:mhtml— MHTML (Word 2003+)