EgoPDF.Markdown
1.0.0
dotnet add package EgoPDF.Markdown --version 1.0.0
NuGet\Install-Package EgoPDF.Markdown -Version 1.0.0
<PackageReference Include="EgoPDF.Markdown" Version="1.0.0" />
<PackageVersion Include="EgoPDF.Markdown" Version="1.0.0" />
<PackageReference Include="EgoPDF.Markdown" />
paket add EgoPDF.Markdown --version 1.0.0
#r "nuget: EgoPDF.Markdown, 1.0.0"
#:package EgoPDF.Markdown@1.0.0
#addin nuget:?package=EgoPDF.Markdown&version=1.0.0
#tool nuget:?package=EgoPDF.Markdown&version=1.0.0
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 (
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 withpdf.LoadFont/pdf.AddFontbefore rendering).
Targets
- net8.0
- net9.0
License
MIT.
| Product | Versions 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. |
-
net8.0
- EgoPDF.Generator (>= 2.3.0)
- Markdig (>= 0.40.0)
-
net9.0
- EgoPDF.Generator (>= 2.3.0)
- Markdig (>= 0.40.0)
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  sizing, line-wrapped fenced code blocks, and a fix so block images advance the cursor past the image instead of overlapping subsequent content.