ToFileAsync

MarkdownConverter.ToFileAsync method

Asynchronously converts the document and saves the result to a file. Both source reading and output writing are performed asynchronously.

public static Task ToFileAsync(string sourcePath, string outputPath, 
    ConvertOptions convertOptions = null, CancellationToken cancellationToken = default)
Parameter Type Description
sourcePath String The path to the source document.
outputPath String The path where the Markdown file will be saved.
convertOptions ConvertOptions Options for the conversion. May be null.
cancellationToken CancellationToken A token to cancel the operation.

Exceptions

exception condition
GroupDocsMarkdownException Thrown when conversion fails.

See Also