Quest for Permissively Licensed PDF Library in C#

https://news.ycombinator.com/rss Hits: 4
Summary

From my experience, every product will eventually want to export some messages or generate a report and it obviously needs to be a PDF. Primarily working with C# these days, it’s a recurring quest to find a good PDF rendering solution for .NET. Quest Unlocked! Naturally, I first started looking for permissively licensed libraries, which could be used free of charge and without additional license requirements. This means anything with a copyleft or commercial license is out of the race. Financial support for open source project or commercialization of said projects is currently a hot topic and not something I want to delve deeper into in this post. Some of my views can be found in other blog posts (here, here, or here). Additionally, I really don’t want to ship a browser engine such as Chromium or WebKit, “just” to render a PDF. It reminds me of the saying: “If all you have is a hammer, everything looks like a nail.” However, while looking at existing solutions, I realized that the hard part is not writing the PDF file format, but it’s the layouting, positioning, styling, etc. that is complicated. It’s also the reason why many solutions do go with a browser engine, because layouting, positioning, styling, etc. is what the browser engines are really good at. This opened up new search criteria in the quest to find a PDF rendering solution: A library that can represent a DOM (Document Object Model) A library that can layout and style a document A library that can write the PDF format A library that can translate between the DOM and PDF format A library that can translate between some document format and the library specific DOM The question no longer is “How do I render a PDF?”, but turned into “How do I get this format I have, into a DOM format a library expects for layouting and styling?” and “How do I get that DOM into a PDF?” Understanding the problem more, my refined search turned up multiple permissively licensed libraries that can write PDFs, but only really one ...

First seen: 2025-11-17 12:46

Last seen: 2025-11-17 15:46