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.
This command line tool is the business! https://wkhtmltopdf.org/
It uses webkit rendering engine(used in safari and KDE), I tested it on some complex sites and it was by far better than any other tool.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With