ToMarkdownAsync

ToMarkdownAsync(string, CancellationToken)

Asynchronously converts the document at the specified path to Markdown. File reading is performed asynchronously.

public static Task<string> ToMarkdownAsync(string sourcePath, 
    CancellationToken cancellationToken = default)
Parameter Type Description
sourcePath String The path to the source document.
cancellationToken CancellationToken A token to cancel the operation.

Return Value

The converted Markdown content.

Exceptions

exception condition
GroupDocsMarkdownException Thrown when conversion fails.

See Also


ToMarkdownAsync(string, LoadOptions, ConvertOptions, CancellationToken)

Asynchronously converts the document at the specified path to Markdown. File reading is performed asynchronously; conversion runs on the thread pool.

public static Task<string> ToMarkdownAsync(string sourcePath, LoadOptions loadOptions, 
    ConvertOptions convertOptions = null, CancellationToken cancellationToken = default)
Parameter Type Description
sourcePath String The path to the source document.
loadOptions LoadOptions Options for loading the document. May be null.
convertOptions ConvertOptions Options for the conversion. May be null.
cancellationToken CancellationToken A token to cancel the operation.

Return Value

The converted Markdown content.

Exceptions

exception condition
GroupDocsMarkdownException Thrown when conversion fails.

See Also