Article is simple and based on WkHtmlToXSharp library which convert's html to PDF, here we had done little enhancement to fulfill our needs, hope this effort would serve you in some way.
Using the code
Code is really simple, you just need to create and object and pass the URL to GetUrlPDF () function described below, which returns byte array, from here it can be converted to your desire stream. Here we had used file stream to put up the show.
WkHtmlToPdfConverter wol = new WkHtmlToPdfConverter();
Byte bufferPDF = wol.GetUrlPDF(url);
System.IO.FileStream writeStream = new System.IO.FileStream("sample.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write);
writeStream.Write(bufferPDF, 0, Convert.ToInt32(bufferPDF.Length));