Solutions · Document Intelligence · Conversion

Every direction. One SDK.

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.

15+ converters Bidirectional Native .NET

Markdown ↔ everything

PDF, HTML, DOCX. Round-trip with formatting preserved.

PDF ↔ Image

Render any PDF page to PNG / JPEG. Wrap any image into a PDF.

Email → PDF / Markdown

EML and MBOX archives. Headers, body, attachments preserved.

The conversion matrix

Pick a direction. One method call.

MarkdownToPdf

Markdown → PDF

Full typography. Tables, lists, code blocks, headings, fonts. Glyphless-font fallback. Page size, margins, code styling all configurable.

MarkdownToDocx

Markdown → DOCX

Markdown to Word with style mapping. Output opens cleanly in Microsoft Word, LibreOffice, Google Docs.

MarkdownToHtml

Markdown → HTML

Customisable CSS classes, heading anchors, table styling. Drop into a static site, an email body, or an in-app help panel.

HtmlToMarkdown

HTML → Markdown

Reverse direction. Preserves links, images, tables, headings. Useful for ingesting web content into RAG pipelines.

DocxToMarkdown

DOCX → Markdown

Tables, lists, headings extracted from Word documents. Format-agnostic intermediate for AI workflows.

DocxMarkdownConverter

DOCX ↔ Markdown

Bidirectional with style mapping. Round-trip safe for most common formatting.

EmlToMarkdown

EML → Markdown

Email parsed: headers, body (plain or HTML), attachments listed. Useful for archive ingestion and RAG over inboxes.

EmlToPdf

EML → PDF

Email rendered as a PDF page. Compliance archives, legal discovery, audit trails.

MboxToMarkdown

MBOX → Markdown

Mailbox archives split per email, each rendered as Markdown with metadata frontmatter.

PdfToImage

PDF → Image

Render at any DPI / zoom. PNG, JPEG, WebP. Drives thumbnails, page previews, vision-model inputs.

ImageToPdf

Image → PDF

Single or multi-page. Layout options. Pair with OCR to produce searchable PDFs from scans.

DocumentToMarkdown

Anything → Markdown

Universal converter that auto-routes between TextExtraction and VlmOcr. The fast path when input format is unknown.

Three common pipelines

Real conversion code.

Render a Markdown source into a print-ready PDF with custom fonts, page size, and margins.

MarkdownReportToPdf.cs
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);
Related capabilities

Conversion plus the toolkit.

PDF toolkit

Merge, split, render, extract pages, search-highlight, generate searchable PDFs.

PDF toolkit page

OCR

Pair Image → PDF with OCR to produce searchable PDFs from scans.

OCR page

Email processing

EML / MBOX / ICS parsing, attachment extraction, archive compliance.

Email processing page

Every direction. Native .NET.

Get Community Edition Download