Table of Contents

Method ConvertToFile

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

ConvertToFile(string, string, MarkdownToPdfOptions)

Converts Markdown text into a PDF file.

public static void ConvertToFile(string markdown, string outputPath, MarkdownToPdfOptions options = null)

Parameters

markdown string

The Markdown content to convert.

outputPath string

Path where the output PDF will be written.

options MarkdownToPdfOptions

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

Examples

using LMKit.Document.Conversion;

MarkdownToPdf.ConvertToFile("# Title\n\nContent here.", "document.pdf");

Exceptions

ArgumentNullException

Thrown when markdown or outputPath is null.