DocumentFormatReader
Overview
DocumentFormatReader is a class in Aspose.Words FOSS for Python.
Inherits from: Protocol.
Protocol defining the interface all document readers must implement.
This class declares 4 methods for DocumentFormatReader objects in Python programs.
Available methods include: load_bytes, load_file, load_stream, to_light_document.
Public members are accessible to any Python application after installing the Aspose.Words FOSS for Python package.
Methods
| Signature | Description |
|---|---|
load_file(filepath: Union[str, Path]) | Loads a document from the given file path or Path object |
load_stream(stream: BinaryIO) | Loads a document from a binary I/O stream |
load_bytes(data: bytes) | Loads a document from an in‑memory bytes object |
to_light_document() → ldm.Document | Converts the loaded content into a shared Light Document Model (ldm.Document) |