EgoPDF.Markdown 1.0.0

dotnet add package EgoPDF.Markdown --version 1.0.0
                    
NuGet\Install-Package EgoPDF.Markdown -Version 1.0.0
                    
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="EgoPDF.Markdown" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EgoPDF.Markdown" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="EgoPDF.Markdown" />
                    
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 EgoPDF.Markdown --version 1.0.0
                    
#r "nuget: EgoPDF.Markdown, 1.0.0"
                    
#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 EgoPDF.Markdown@1.0.0
                    
#: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=EgoPDF.Markdown&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=EgoPDF.Markdown&version=1.0.0
                    
Install as a Cake Tool

EgoPDF.Markdown

Render Markdown documents to PDF on top of EgoPDF.Generator and Markdig.

Preview. Phase-1 happy path. Tables, blockquote styling polish, footnotes, task lists and inline images are planned for later releases.

Quick start

using Ego.PDF;
using Ego.PDF.Data;
using Ego.PDF.Markdown;

using var pdf = new FPdf("readme.pdf");
pdf.AddPage(PageSizeEnum.A4);

MarkdownRenderer.RenderFile(pdf, "README.md");
pdf.Close();

Or render an inline string:

MarkdownRenderer.Render(pdf, "# Hello\n\nThis is **bold** Markdown.");

What works in this preview

  • Headings H1-H6 (sized hierarchy + accent colour from the theme).
  • Paragraphs with inline emphasis: **bold**, *italic*, `code`, [link](url), <https://autolink>, hard/soft line breaks.
  • Unordered and ordered lists, including nested lists.
  • Fenced (```) and indented code blocks, with a tinted background.
  • Horizontal rules (---).
  • Block-level local images (![alt](path.png) on its own line). Remote URLs and inline images fall back to a muted [alt] placeholder.
  • Block quotes (> ...) with a left accent rule.

Theming

Pass a MarkdownTheme to override fonts, sizes, colours and spacing:

var theme = new MarkdownTheme
{
    BodyFont = "Helvetica",
    HeadingFont = "Helvetica",
    CodeFont = "Courier",
    AccentColor = new Microsoft.Xna.Framework.Color(40, 116, 166),
};
MarkdownRenderer.Render(pdf, markdown, theme);

Two built-in themes:

  • MarkdownTheme.Default (FPDF core fonts only — no setup).
  • MarkdownTheme.EgoPdf (Poppins + Roboto + Roboto Mono — load them with pdf.LoadFont / pdf.AddFont before rendering).

Targets

  • net8.0
  • net9.0

License

MIT.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.0.0 45 6/7/2026
1.0.0-preview.3 44 6/6/2026
1.0.0-preview.2 42 6/2/2026

1.0.0: first stable release. Same Markdown surface as preview.3 -- this build only picks up EgoPDF.Generator 2.3.0 (the PDF-spec fixes that stop Acrobat from offering to "save the repaired file"). preview.2 added multi-line shortcodes, the built-in [[image]] shortcode (auto-registered) with src / width / align / caption / link, MarkdownTheme.ListItemSpacing for tight bullet lists, MarkdownTheme.ImageDpi (default 150) for plain-Markdown ![alt](url) sizing, line-wrapped fenced code blocks, and a fix so block images advance the cursor past the image instead of overlapping subsequent content.