I have used PDFDuo-NET.dll (version 2.3) in my project which is very useful. First, you need to convert content of your ASPX to HTML and then converted that HTML content into a PDF file or another way which I use is to create a simple HTML string and then convert it.See below C# code:
using System;
using System.Web;
using System.Web.UI;
using System.IO;
using DuoDimension;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string html = "<table width="240">" +
"<tr style="background-color:#00AAFF"><td width="50%">Product</td><td width="25%">Quantity</td><td>Cost</td></tr>" +
"<tr><td>Product Name 1</td><td>5</td><td>$100</td></tr>" +
"<tr><td>Product Name 2</td><td>15</td><td>$300</td></tr>" +
"<tr><td>Product Name 3</td><td>55</td><td>$500</td></tr>" +
"</table>";
string pdf = "pdf_file.pdf";
DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
conv.PageInfo.PageFormat = ePageFormat.A4;
conv.PdfDocumentInfo.Title = "Generate PDF from HTML source";
conv.Header = "<br>HTML table Example";
try
{
conv.OpenHTML(html);
conv.SavePDF(MapPath("~/Reports/") + pdf);
}
catch (Exception ex)
{
throw ex;
}
}
}</br>
See here
http://www.duodimension.com/html_pdf_asp.net/Articles/pdfduo23_090815.html[
^]
And here
Generate PDF documents from a HTML page using ASP.NET[
^]