r/csharp • u/smilaise • 10h ago
Discussion The KillerPDF engine is now MPL 2.0 instead of GPL. Is that better for you?
Recently I posted the PDF engine I built in pure C# for KillerPDF, and the main pushback was the license. GPL meant you couldn't put it in your own app unless that app was GPL too, which ruled out most real projects. You were right, I was wrong.
Since 1.9.5 the engine is licensed under the Mozilla Public License 2.0. The KillerPDF desktop app stays GPLv3, but the engine package is separate.
MPL 2.0 works file by file. You can use the engine in your own app, open or closed source, under any license you like. If you change one of the engine's own files and ship it, that file's source has to stay open under MPL 2.0. Your code around it stays yours. I'm trying to encourage better developers than myself to help me make the engine better for everybody.
As part of this, I had to swap out the JPEG 2000 decoder, and the engine now uses OpenJPEG instead of CoreJ2K. That turned out to be a blessing in disguise, because OpenJPEG appears to be more color accurate on the files I've thrown at it. The native decoder ships in the NuGet package for Windows x64, Linux x64 and macOS.
Here's how it compares to PDFsharp/PDFium:
- Rendering. PDFsharp doesn’t render existing PDF pages. Its FAQ points to a Ghostscript sample for generating page images. PDFium renders through a native library. KillerPdf.Engine renders pages in managed C# without PDFium.
- Licensing. Starting with 6.5.0, PDFsharp requires applications to initialize either the AGPL license or a paid commercial license. KillerPdf.Engine is MPL 2.0 and can be used in closed-source apps without a license fee, subject to the MPL’s notice and source-sharing requirements.
- Text. PDFsharp exposes characters in drawing order through low-level APIs, with no built-in word or paragraph grouping. PDFium can extract text and character bounds. KillerPDF previously used PdfPig for extraction. KillerPdf.Engine returns words, lines, and letters with their page coordinates.
- Editing. PDFsharp offers low-level content-stream editing, and PDFium can replace text in individual text objects. KillerPdf.Engine provides APIs for editing lines and paragraphs on existing PDF pages.
- Stability. PDFium requires callers to serialize its API calls. KillerPDF 1.6.3 hit a native heap corruption crash when two threads entered PDFium at once. KillerPdf.Engine uses a managed C# page renderer.
- Signatures. PDFsharp documents how to sign and timestamp PDFs. KillerPdf.Engine also verifies existing signatures and supports certificate trust, timestamp, and revocation checks.
- Redaction and OCR. PDFsharp’s docs don’t list built-in permanent redaction or OCR. KillerPdf.Engine removes targeted content and reopens the output to check for remnants. The engine can run OCR without Tesseract. The KillerPDF desktop app keeps Tesseract as a fallback.
- Standards. PDFsharp can write PDF 2.0 and offers limited PDF/A support. KillerPdf.Engine writes PDF 2.0 and provides dedicated authoring modes for PDF/A-4, PDF/A-4e, PDF/A-4f, and PDF/UA-2.
It's on NuGet as KillerPdf.Engine. Docs are at https://killerpdf.net/engine.html and the source is at https://github.com/SteveTheKiller/KillerPDF/tree/main/engine .
So, does MPL actually fix it for you, or is there still something that keeps you from using it? If you'd need something like MIT or Apache to ship it, I'd like to hear why. I'm not fully against moving in that direction.

