Converting HTML to PDF in VB.Net with PDFSharp

An interesting little problem we’ve had to implement for a client recently; how to take an HTML (passed through as an email attachment), and convert it to a PDF in a VB.net command line program. There are lots of 3rd party libraries around that do that, but typically, they’re expensive and not terribly reliable, formatting the HTML that we wanted …