Open Source HTML to PDF Renderer with Full CSS Support

c#, css, html, pdf, pdf-generation

Solution

I've always used it on the command line and not as a library, but HTMLDOC gives me excellent results, and it handles at least some CSS (I couldn't easily see how much).

Here's a sample command line

htmldoc --webpage -t pdf --size letter --fontsize 10pt index.html > index.pdf

Problem

I asked about getting iTextSharp to render a PDF from HTML and a CSS sheet before here but it seems like that may not be possible... So I guess I will have to try something else. Is there an open source .NET/C# library out there that can take HTML and CSS as input and render it correctly? I must reiterate... the library MUST be free and preferably something with a fairly liberal license. I'm working with basically no budget here.

Original source

Related problems