PDFsharp shows up in a lot of .NET codebases quietly, with no sales call and no license negotiation, just a NuGet install and a coordinate system for drawing onto a page. That is often exactly enough for a code-generated invoice, and it stays enough until a project needs something PDFsharp was never built for, an HTML email template turned into a PDF, readable paragraphs pulled back out of a report, or a PDF/A file that holds up for a compliance team. The question an architecture review should ask is who builds and maintains the layer PDFsharp leaves out, which is where a side-by-side read starts to price the choice.
A quick disclosure. Our team at Iron Software develops IronPDF, and we highlight where PDFsharp is better suited.
Where PDFsharp Stops
The constraint that ends most PDFsharp evaluations is rendering. PDFsharp can build a page from scratch, but it cannot open an existing PDF and render it, so there is no preview, no thumbnail, and no page-to-image export, and a document list that needs a thumbnail of page one or a QA step that needs an image diff between two versions requires a second library bolted on for that step alone, the step a native rasterizer covers in one call.
Text extraction stops at raw characters in the same way. PDFsharp hands back character positions in drawing order and nothing else, with no word, line, or paragraph reconstruction, so a project that needs readable text out of a PDF is writing that reconstruction logic itself rather than reaching for a word-level extraction call that returns the paragraphs already assembled.
The largest gap is HTML, in both directions. There is no HTML or CSS engine anywhere in PDFsharp, so an existing template, email design, or web page has to be hand-ported into XGraphics and MigraDoc calls line by line, and the maintainers have said outright they do not intend to build a PDF-to-Word or PDF-to-HTML converter, so the reverse is closed too, which is the whole job a Chromium renderer is built to do. Font coverage is narrower as well, limited to TrueType and OpenType-with-TrueType-outlines, and PDF/A creation shipped early with no way yet to target a specific conformance level, so a compliance requirement that needs a defined level today runs straight into that gap where a validated PDF/A path would meet it.
Drawing by Coordinate
Set against those gaps, PDFsharp keeps one strength. Its model is a blank page and a coordinate system, a different design point than a browser engine, and for a fixed-layout invoice that never touches HTML, that can mean less code than rendering a template, a pattern a code-first generation path recognizes.
using PdfSharp.Drawing;
using PdfSharp.Pdf;
// draw text at a fixed position on a blank page
var document = new PdfDocument();
var page = document.AddPage();
var gfx = XGraphics.FromPdfPage(page);
var font = new XFont("Verdana", 20);
gfx.DrawString("Invoice #1042", font, XBrushes.Black,
new XRect(0, 0, page.Width, 50), XStringFormats.Center);
document.Save("invoice.pdf");
The MIT terms are the other point in its favor, unrestricted by empira with no seat or revenue threshold, which stands out next to source-available licenses that stop applying past a revenue line, and the project is not stagnant either, with 6.2.4 in January 2026 adding digital signatures, AES-256 encryption, and PDF/UA output on a real cadence that an actively released library can be weighed against.
The Capability and License Split
The differences that decide a .NET project sit in the layers PDFsharp does not ship, not in the drawing model it does, and the table draws from PDFsharp's own release notes and FAQ rather than an older post, read against what a single renderer covers.
| Capability | PDFsharp | IronPDF |
|---|---|---|
| License | MIT | Commercial, with support and updates |
| Cost at scale | Engineering time for the missing layers | One license, those layers built in |
| HTML and CSS to PDF | Not supported | Chromium ChromePdfRenderer
|
| Coordinate-based drawing |
XGraphics canvas |
Available, alongside HTML |
| Higher-level assembly | Through MigraDoc | Built in, plus HTML and CSS |
| Read and modify existing PDFs | Supported | Supported |
| Text extraction | Raw character positions |
ExtractAllText at word level |
| Rasterize pages to images | No native support |
RasterizeToImageFiles, built in |
| PDF/A creation | Early-stage, no level target | Supported and validated |
| PDF/UA tagging | Supported since 6.2.x
|
Supported and validated |
| Digital signatures | Supported since 6.2.0
|
PdfSignature with timestamps |
| Encryption | AES-256, PDF 2.0 | AES-256, PDF 2.0 |
| Release cadence |
6.2.4, January 2026 |
2026.7.2, shipped June 2026 |
Table 1. PDFsharp and IronPDF across the capability and licensing questions a .NET review tends to price.
Reading the Maintenance Record
PDFsharp's security record is clean, with no CVEs of its own in the GitHub Advisory Database, NVD, or Snyk, and the one item a search surfaces is a NuGet restore warning for System.Formats.Asn1, which is CVE-2024-38095 in the .NET runtime's X.509 parsing rather than in PDFsharp's own code, resolved by bumping the dependency in a 6.2.0 preview, the same read a maintained release line would give it.
That pattern holds for the project. Each release corresponds to a commit on the master branch, 6.2.4 landed in January 2026 keeping pace with .NET 8, 9, and 10, and the open question for a review is scope, the rendering and extraction layers PDFsharp does not intend to add and a team therefore builds and carries itself against a single package that ships them.
Closing the Gaps in One Library
Teams tend to hit the same wall, an existing web page or Razor view that has to become a PDF without re-implementing the layout by hand. IronPDF renders that markup through Chromium in one call.
using IronPdf;
// render existing HTML through the bundled Chromium engine
var renderer = new ChromePdfRenderer();
using var pdf = renderer.RenderHtmlAsPdf("<h1>Invoice #1042</h1><p>Total due: $250.00</p>");
pdf.SaveAs("invoice.pdf");
Because the engine is a real Chromium build, HTML, CSS, and script-driven content come out the way a browser shows them, and PDF/A, word-level extraction, and page-to-image rasterization are built in rather than gaps to design around, which is where a Razor-to-PDF path and a rasterizer call stay inside one package. That is the layer PDFsharp leaves to the team, closed inside a single commercial package with published pricing rather than a set of second dependencies to bolt on and maintain.
Choosing by Where the Document Starts
A fixed-layout invoice that never touches HTML is the one case PDFsharp plus MigraDoc answers. Every other direction a review runs, once the document starts as HTML, or the project needs level-specific PDF/A, readable text back out, or a page rendered to an image, a Chromium-based renderer closes those gaps inside one package rather than turning each into a second dependency to bolt on and maintain, which IronPDF's documentation walks through. Which of PDFsharp's gaps hit your project first, the missing rasterizer, the raw-character extraction, or the absent HTML engine? Tell us in the comments.
PDFsharp is MIT-licensed by empira Software GmbH, and the PDFsharp name is the property of its owner, with which we have no affiliation. The details above are drawn from its public documentation, release notes, and the public CVE record as they stood at the time of writing. If a point came out wrong, tell us in the comments.
Top comments (0)