DocumentFormatReader

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 provides 4 methods for working with DocumentFormatReader objects in Python programs. Available methods include: load_bytes, load_file, load_stream, to_light_document. All public members are accessible to any Python application after installing the Aspose.Words FOSS for Python package.

Methods

SignatureDescription
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.DocumentReturns a lightweight ldm.Document representation of the loaded content

See Also

 English