PDF generation from C#

The free (MIT License) library PDFSharp can generate PDFs programmatically using C#.

It cannot (itself) convert HTML to PDFs, but some 3rd party solutions exist for that purpose

HTML to PDF using PDFSharp

It can also handle some CSS (but it requires a specific syntax – ie. not all valid CSS is usable here)


Another option is Essential Objects PDF which contains an inbuilt HTML->PDF converter. This is NOT free, but an evaluation version is available.

It works very well, but contains an entire HTML engine, and hence, consumes quite a lot of memory. So much in fact, that you have to put a limit to the amount of simultaneous executions if you use it in an integration-scenario

On the positive side, it generates PDFs which looks very nice