VectorAi.MarkdownToPdf 10.0.1

dotnet add package VectorAi.MarkdownToPdf --version 10.0.1
                    
NuGet\Install-Package VectorAi.MarkdownToPdf -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VectorAi.MarkdownToPdf" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VectorAi.MarkdownToPdf" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="VectorAi.MarkdownToPdf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VectorAi.MarkdownToPdf --version 10.0.1
                    
#r "nuget: VectorAi.MarkdownToPdf, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VectorAi.MarkdownToPdf@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VectorAi.MarkdownToPdf&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=VectorAi.MarkdownToPdf&version=10.0.1
                    
Install as a Cake Tool

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: alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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