RtfFileReader

Overview

RtfFileReader is a class in Aspose.Words FOSS for Python.

Reads RTF files (OLE2-format) and produces the same data structures

as DocumentReader (for .docx) and DocFileReader (for .doc).

This class provides 5 methods for working with RtfFileReader objects in Python programs. Available methods include: __init__, 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
__init__()
load_file(filepath: Union[str, Path])Load .rtf from file path.
load_stream(stream: BinaryIO)Load .rtf from stream.
load_bytes(data: bytes)Load .rtf from bytes.
to_light_document()ldm.DocumentBuild a light_document_model.Document from the loaded RTF file.

See Also

 English