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
markdownPathstringPath to the Markdown file.
optionsMarkdownToPdfOptionsOptional conversion options for page size, margins, and font size.
Returns
- Attachment
A new Attachment containing the generated PDF.
Exceptions
- ArgumentNullException
Thrown when
markdownPathisnull.- FileNotFoundException
Thrown when the specified file does not exist.