Thanks to Paul, I have found the good wrapper written by Codaxy, which can also be easily downloaded via NuGet.
After a few trials, I have managed this MVC action, that instantly creates and returns the PDF file as a stream:
public ActionResult Pdf(string url, string filename)
{
MemoryStream memory = new MemoryStream();
PdfDocument document = new PdfDocument() { Url = url };
PdfOutput output = new PdfOutput() { OutputStream = memory };
PdfConvert.ConvertHtmlToPdf(document, output);
memory.Position = 0;
return File(memory, "application/pdf", Server.UrlEncode(filename));
}
Here, the Pdf* classes have been implemented in the wrapper, with a nice, clean code, unfortunately lacking documentation.
Within the converter, the URL will be converted to a PDF, stored in a temporary file, copied to the stream that we have given as parameter, and afterwards the PDF file is deleted.
Finally, we have to push the stream as FileStreamResult.
Do not forget to set the output stream's Position to zero, otherwise you will see PDF files being downloaded as zero bytes of size.