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
markdownstringThe Markdown content to convert.
outputPathstringPath where the output PDF will be written.
optionsMarkdownToPdfOptionsOptional 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
markdownoroutputPathisnull.