PDF in ASP.net

Status
Not open for further replies.
There are a few PDF generation libraries available. We have used iText with Java (Servlets). It is quite good and provides good features. You can try the C# port of it.

iTextSharp
 
Hi,

Try PDF Duo .NET by duodimension.com. It is converting component on basis of ASP.NET. More details you can find on page:
http://www.duodimension.com/html_pdf_asp.net/component_html_pdf.aspx

Example of use:

Code:
public partial class _Default : System.Web.UI.Page    
{   
    protected void Page_Load(object sender, EventArgs e)   
    {   
        DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();   
        conv.BasePath = MapPath("~/");   
        conv.PageFormat = DuoDimension.ePageFormat.A4;   
        conv.PageOrientation = DuoDimension.ePageOrientation.Portrait;   
        conv.OpenHTML(@"   
                <table width='100%'>   
                  <tr>   
                    <td width='19%'>[b]Last update:[/b]</td>   
                    <td width='81%'> 23 Jun 2009 - 01:22</td>   
                  </tr>   
                  ...   
                </table>   
        ");   
        conv.SavePDF(MapPath("~/pdf/") + "report.pdf");   
        preport.InnerText = "The report has been created.";   
    }   
}
 
dennis_nail said:
There are a few PDF generation libraries available. We have used iText with Java (Servlets). It is quite good and provides good features. You can try the C# port of it.

iTextSharp

We use iTextSharp in my company and it works well enough. Another option is, if you have SQL server as db, to use SQL Server Reporting Services along with .rdl/.rdlc reports which can be created in visual studio. These reports can be exported to pdf/xls/csv formats by the user.
 
Status
Not open for further replies.