MarkdownReader

Overview

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

Reads Markdown (.md) files, producing the same data structures as

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

This class provides 5 methods for working with MarkdownReader 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. Properties: encoding, preserve_empty_lines.

Properties

NameTypeAccessDescription
encodingstrRead/WriteText encoding used to decode the Markdown source.
preserve_empty_linesboolReadGets the preserve empty lines.

Methods

SignatureDescription
__init__()Calls init on this MarkdownReader instance.
load_file(filepath: Union[str, Path])Load a .md file from filepath.
load_stream(stream: BinaryIO)Load from a binary stream.
load_bytes(data: bytes)Load from raw bytes.
to_light_document()ldm.DocumentBuild a light_document_model.Document from the loaded Markdown.

See Also