Markdown ↔ everything
PDF, HTML, DOCX. Round-trip with formatting preserved.
Production .NET applications need to move documents between formats constantly: PDF reports out of Markdown, DOCX letters from templates, HTML email bodies from Markdown content, archived emails into PDF, spreadsheets into images. LM-Kit ships 15+ converters covering the full matrix. Native .NET, no command-line dependencies, no cloud calls.
PDF, HTML, DOCX. Round-trip with formatting preserved.
Render any PDF page to PNG / JPEG. Wrap any image into a PDF.
EML and MBOX archives. Headers, body, attachments preserved.
MarkdownToPdf
Full typography. Tables, lists, code blocks, headings, fonts. Glyphless-font fallback. Page size, margins, code styling all configurable.
MarkdownToDocx
Markdown to Word with style mapping. Output opens cleanly in Microsoft Word, LibreOffice, Google Docs.
MarkdownToHtml
Customisable CSS classes, heading anchors, table styling. Drop into a static site, an email body, or an in-app help panel.
HtmlToMarkdown
Reverse direction. Preserves links, images, tables, headings. Useful for ingesting web content into RAG pipelines.
DocxToMarkdown
Tables, lists, headings extracted from Word documents. Format-agnostic intermediate for AI workflows.
DocxMarkdownConverter
Bidirectional with style mapping. Round-trip safe for most common formatting.
EmlToMarkdown
Email parsed: headers, body (plain or HTML), attachments listed. Useful for archive ingestion and RAG over inboxes.
EmlToPdf
Email rendered as a PDF page. Compliance archives, legal discovery, audit trails.
MboxToMarkdown
Mailbox archives split per email, each rendered as Markdown with metadata frontmatter.
PdfToImage
Render at any DPI / zoom. PNG, JPEG, WebP. Drives thumbnails, page previews, vision-model inputs.
ImageToPdf
Single or multi-page. Layout options. Pair with OCR to produce searchable PDFs from scans.
DocumentToMarkdown
Universal converter that auto-routes between TextExtraction and VlmOcr. The fast path when input format is unknown.
Render a Markdown source into a print-ready PDF with custom fonts, page size, and margins.
using LMKit.Document.Conversion; // Daily report generated from Markdown templates, exported as PDF. var opts = new MarkdownToPdfOptions { PageSize = PageSize.A4, Margin = new Margins(2, 2, 2, 2), CodeFont = "JetBrains Mono", BodyFont = "Inter", EnableHeadings = true, }; await new MarkdownToPdf().ConvertAsync(markdown, @"C:\out\report.pdf", opts);
Iterate over every message in an mbox archive and emit one PDF per email for compliance bundles.
// Convert a year of mailbox archives to PDF for a compliance bundle. var mbox = new MboxDocument(@"C:\archives\2026.mbox"); var emlToPdf = new EmlToPdf(); foreach (var eml in mbox.Emails) { await emlToPdf.ConvertAsync(eml, $@"C:\out\{eml.MessageId}.pdf"); }
Render each PDF page as a PNG at the chosen DPI, for previews and document galleries.
// Render every page of a PDF as a thumbnail image. var pdfToImage = new PdfToImage(@"C:\reports\Q3.pdf"); for (int i = 0; i < pdfToImage.PageCount; i++) { using var img = pdfToImage.RenderPage(i, dpi: 96); img.Save($@"C:\out\thumb_{i:D3}.png"); }
The universal converter when the input format is unknown or mixed.
Merge, split, render, extract pages, search-highlight, generate searchable PDFs.
Pair Image → PDF with OCR to produce searchable PDFs from scans.
EML / MBOX / ICS parsing, attachment extraction, archive compliance.
Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.
Console demo: convert PDFs, DOCX, HTML to clean Markdown.
Open on GitHub → DemoConsole demo: full-document processing pipeline with built-in tools.
Open on GitHub → How-to guidePer-format heuristics, table preservation, layout-aware output.
Read the guide →