Table of Contents

Method Convert

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

Convert(string, MarkdownToPdfOptions)

Converts Markdown text into a PDF attachment.

public static Attachment Convert(string markdown, MarkdownToPdfOptions options = null)

Parameters

markdown string

The Markdown content to convert.

options MarkdownToPdfOptions

Optional conversion options for page size, margins, and font size.

Returns

Attachment

A new Attachment containing the generated PDF.

Examples

using LMKit.Data;
using LMKit.Document.Conversion;

string markdown = "# Report\n\nFindings are **significant**.";
Attachment pdf = MarkdownToPdf.Convert(markdown);

Exceptions

ArgumentNullException

Thrown when markdown is null.