RtfFileReader
Overview
RtfFileReader 是Python的Aspose.Words FOSS中的一个类.
读取 RTF 文件 (OLE2 格式) 并生成相同的数据结构.
as DocumentReader (for .docx) and DocFileReader (for .doc).这个类提供了在Python程序中与RtfFileReader对象工作的5种方法. 有的方法包括: __init__, load_bytes, load_file, load_stream, to_light_document. 在安装Python包的Aspose.Words FOSS后,所有公众成员都可以访问任何 Python 应用程序.
Methods
| Signature | Description |
|---|---|
__init__() | |
load_file(filepath: Union[str, Path]) | 从文件路径上加载.rtf. |
load_stream(stream: BinaryIO) | 通过流程加载.rtf. |
load_bytes(data: bytes) | 从字节上加载.rtf. |
to_light_document() → ldm.Document | 从加载的 RTF 文件中创建 light_document_model. |