how to pass html as a string instead of url in wkhtmltopdf using asp.net, c#?
I know this is an older post, but I want future developers to have this option. I had the same need, and the idea of having to start a background process just to get a PDF inside of a web app is terrible.
Here's another option: https://github.com/TimothyKhouri/WkHtmlToXDotNet
It's a .NET native wrapper around wkhtmltopdf.
Sample code here:
var pdfData = HtmlToXConverter.ConvertToPdf("COOOL!
");
Note, it's not thread-safe as of right now - I'm working on that. So just use a monitor or something or a lock.