I maintain miPDFlib, an open-source PDF library for .NET 8 and 10: Apache-2.0, pure managed code, no native binaries, and the only dependency is System.Security.Cryptography.Pkcs. (It's my project, so read this as the author's view.)
Some background: I've worked on electronic signatures since 2003, and in every project the PDF part meant iText (AGPL or commercial) or another commercial library. I wanted something I can ship in closed products without a licence key or a revenue limit.
**What it covers**
- **Create and edit:** a layout engine with paragraphs, tables (repeated headers, spans, rows split across pages), lists and page breaks; TrueType/OpenType subsetting; Arabic, Hebrew and Indic scripts; merge/split, forms, annotations, layers, AES and certificate encryption
- **Sign and verify:** PAdES B-B to B-LTA with time-stamps and OCSP/CRL, HSM and cloud signers, two-step signing – built on .NET's own cryptography, no BouncyCastle. Verification checks integrity, the certificate chain at a time proven by a trusted time-stamp, and what was changed after signing.
- **Archive and invoice:** PDF/A-1b to A-4, PDF/UA-1 and -2 (the layout engine tags as it goes), ZUGFeRD / Factur-X / XRechnung
- **Read:** words, lines and letters with positions; reading order across columns; layout analysis (headings, lists, tables with cells) with export to Markdown, hOCR, ALTO and PAGE; an option to get only the text a reader can see, so white, hidden or covered text doesn't end up in your LLM prompt; real redaction
- **Optional packages:** miPDFlib.Rendering (pages to PNG) and miPDFlib.PostScript (PostScript/EPS to PDF), also managed code only
// create
using var pdf = PdfDocument.Create();
using (var layout = new LayoutDocument(pdf, PageSize.A4, new Thickness(50)))
layout.Add(new Paragraph("Hello r/dotnet", PdfStandardFont.HelveticaBold, 20));
pdf.Save("hello.pdf");
// sign (PAdES with a time-stamp) and verify
byte[] signed = PdfSigner.Sign(File.ReadAllBytes("hello.pdf"), CertificateSigner.FromPfx("me.pfx", "pw"),
new PdfSignatureOptions { TimestampClient = new HttpTimestampClient("http://timestamp.digicert.com") });
foreach (var result in PdfSignatureValidator.Validate(signed))
Console.WriteLine($"{result.FieldName}: intact {result.IsIntegrityValid}, level {result.Level}");
// PDF to Markdown for a RAG pipeline: columns, headings, tables, no running heads
using var doc = PdfDocument.Open("report.pdf");
string markdown = PdfLayoutExport.ToMarkdown(doc);
**How it's tested.** I'll say it up front because it always comes up: I wrote it from the public specs (ISO 32000, the ETSI PAdES standards) with a lot of AI assistance, so most of my time went into checking the result. 887 unit tests; PDF/A and PDF/UA output validated with veraPDF, signatures with the EU DSS validator, rendering compared with Ghostscript, and runs over a corpus of real-world PDFs. There's a published security audit against OWASP ASVS and the known attacks on PDF signatures (universal signature forgery, incremental saving, signature wrapping, shadow attacks), CodeQL on every push, and a mutation fuzzer that feeds it 40,000 new damaged documents every night. How the AI part went: https://www.mitterbucher.com/en/articles/mipdflib-aipdflib/
**What it doesn't do:** convert HTML or Office files (LibreOffice via Gotenberg works well for that – sign or post-process the result with miPDFlib), OCR, or commercial support. The layout analysis is heuristics, not a vision model. And it's young: the first public release was at the end of October 2026; the API has been stable since 1.0. My own signing products run on it in production, so it will be maintained.
- GitHub: https://github.com/Mibuw/miPDFlib
- NuGet: `dotnet add package miPDFlib`
- Docs: https://mibuw.github.io/miPDFlib/
- Comparison with iText, Syncfusion, PDFBox, PdfPig, PDFsharp and QuestPDF, including where they're ahead: https://github.com/Mibuw/miPDFlib/blob/main/docs/COMPARISON.md
I'd appreciate feedback on the API, and most of all PDFs that break it – or a synthetic copy of the layout if the real one is confidential.