Table of Contents

Method MarkdownToDocxAsync

Namespace
LMKit.Document.Conversion
Assembly
LM-Kit.NET.dll

MarkdownToDocxAsync(string, CancellationToken)

Asynchronously converts Markdown text to a DOCX document represented as bytes.

public static Task<byte[]> MarkdownToDocxAsync(string markdown, CancellationToken cancellation = default)

Parameters

markdown string
cancellation CancellationToken

Returns

Task<byte[]>

Examples

using LMKit.Document.Conversion;

string markdown = "# Async example\n\nGenerated with async API.";
byte[] docxBytes = await MarkdownDocxConverter.MarkdownToDocxAsync(markdown);
await File.WriteAllBytesAsync("async-example.docx", docxBytes);