VectorAi.MarkdownToPdf
10.0.1
dotnet add package VectorAi.MarkdownToPdf --version 10.0.1
NuGet\Install-Package VectorAi.MarkdownToPdf -Version 10.0.1
<PackageReference Include="VectorAi.MarkdownToPdf" Version="10.0.1" />
<PackageVersion Include="VectorAi.MarkdownToPdf" Version="10.0.1" />
<PackageReference Include="VectorAi.MarkdownToPdf" />
paket add VectorAi.MarkdownToPdf --version 10.0.1
#r "nuget: VectorAi.MarkdownToPdf, 10.0.1"
#:package VectorAi.MarkdownToPdf@10.0.1
#addin nuget:?package=VectorAi.MarkdownToPdf&version=10.0.1
#tool nuget:?package=VectorAi.MarkdownToPdf&version=10.0.1
MarkdownToPdf Library
MarkdownToPdf is a .NET library serving as a converter of markdown text to PDF. It supports fully customizable styling via cascading styles, page setup, headers and footers, page numbering, sections, page and sections breaks and it also supports plugins for features like syntax highlighting or for displaying mathematical expressions. Technically it uses markdig library to parse the markdown document and Pdfsharp/Migradoc library to render the output. It also uses ImageSharp from SixLabors to handle cross platform image rendering.
Disclaimer
This is a fresh fork from https://github.com/tkubec/MarkdownToPdf and upgraded to .NET 10.
Not yet everything is ported and tested fully.
The aim is to keep up the support for new .NET versions and to ensure cross platform compatibility
Supported markdown flavors and extensions
- basic and github markdown
- Pipe tables
- Grid tables
- Extra emphasis (strike through ~~,Subscript ~ Superscript ^ Inserted ++ Marked ==)
- Special attributes for applying styles and formatting
- Footnotes
- Task Lists
- Citation text by enclosing ""...""
- Custom containers similar to fenced code block :::
- Mathematics/Latex extension by enclosing $$ for block and $ for inline math
- SmartyPants
For details, see markdig documentation and this project documentation.
Basic Usage
The basic usage is pretty straightforward:
- create an instance of
MarkdownToPdf - optionally set-up the page layout
- optionally modify or add styles
- add the markdown text
- save
E.g.:
var pdf = new MarkdownToPdf();
pdf
.Add("# Hello, Wolrd")
.Save("output.pdf");
Please see the documentation for more information. Here are some sample PDF outputs:
Installation
The library is available as a NuGet package:
Plugins
Syntax highlighter
MarkdownToPdf.SyntaxHighlighter based on PrismSharp currently supports over 270 programming languages and has 44 built in visual themes
License
This software is released under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Markdig (>= 0.44.0)
- PDFsharp-MigraDoc (>= 6.2.3)
- SixLabors.ImageSharp (>= 3.1.12)
- System.Drawing.Common (>= 10.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.1 | 231 | 12/19/2025 |
| 10.0.0-preview.24 | 51 | 1/1/2026 |