Skip to main content
The DocumentConverterResult class represents the result of converting a document to Markdown. It contains the converted Markdown text and optional metadata.

Constructor

Create a new conversion result.
str
required
The converted Markdown text.
str
Optional title of the document. Extracted from the document when available.

Example

Properties

markdown

The converted Markdown text.
str
The full Markdown content generated from the document.

Example

title

The optional title of the document.
str | None
Document title extracted during conversion, or None if no title was found.

Example

text_content (deprecated)

text_content is soft-deprecated. Use markdown or str(result) instead.
Alias for the markdown property. Provided for backward compatibility.
str
Same as markdown. New code should use markdown directly.

Methods

__str__()

Returns the converted Markdown text. Allows the result object to be used as a string.
str
The Markdown content.

Example

Usage Examples

Basic Conversion

Saving to File

Processing Multiple Files

Extracting Metadata

Custom Converter Implementation

Return Value Processing

String Operations

Markdown Processing

See Also