Table of Contents

Method ConvertFile

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

ConvertFile(string, MarkdownToPdfOptions)

Converts a Markdown file into a PDF attachment.

public static Attachment ConvertFile(string markdownPath, MarkdownToPdfOptions options = null)

Parameters

markdownPath string

Path to the Markdown file.

options MarkdownToPdfOptions

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

Returns

Attachment

A new Attachment containing the generated PDF.

Exceptions

ArgumentNullException

Thrown when markdownPath is null.

FileNotFoundException

Thrown when the specified file does not exist.