DocumentConverterResult class represents the result of converting a document to Markdown. It contains the converted Markdown text and optional metadata.
Constructor
str
required
The converted Markdown text.
str
Optional title of the document. Extracted from the document when available.
Example
Properties
markdown
str
The full Markdown content generated from the document.
Example
title
str | None
Document title extracted during conversion, or
None if no title was found.Example
text_content (deprecated)
markdown property. Provided for backward compatibility.
str
Same as
markdown. New code should use markdown directly.Methods
__str__()
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
- DocumentConverter - Base class that produces this result
- MarkItDown.convert() - Primary method that returns this type
- StreamInfo - Input metadata for converters