use.
wkhtmltopdf.exe
in bin folder of your project.
string url= @"http://www.google.com";
try
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = Server.MapPath("~/bin/") + "wkhtmltopdf.exe";
process.StartInfo.Arguments = "\""+ url+ " " + Server.MapPath("~/PDFFiles/") + "test.pdf\"";
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
process.WaitForExit();
}
catch (Exception ee)
{
}
or see this ref.
Pdfizer, a dumb HTML to PDF converter, in C#[
^]