You must Sign In to post a response.
  • Category: ASP.NET

    How to retrieve data from database in pdf format

    my table in sql server is employeep
    with columns eid,firstname,lastname,salary
    so in my employee .aspx page i have dropdown named ddlemployeesand button control named btnreport
    so if i selected any value in dropdown and click on btnreport if the value in eid then record related to that value should come from database in pdfformat
  • #761392

    If you are saving pdf bytes in the database you can retrieve it as PDF. But your case, you have to create PDF using C#.

    Normally we will use iTextSharp libraries

    Refer the following link for creating PDF file
    http://sourceforge.net/projects/itextsharp/


    By Nathan
    Direction is important than speed

  • #761396

    hi
    Velindram

    If you need pdf convertion to data means

    You can go through this url
    http://www.codeproject.com/Questions/203481/HTML-convert-to-PDF-using-itextsharp

    http://www.aspforums.net/Threads/142937/iTextSharp-How-to-convert-HTML-Table-string-to-PDF-using-C-Net/


    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761415
    Hai VELIDIRAVIRAM,
    As per your requirements, when you selected an record in the dropdown list, you need to retrieve the data into the datatable and then you can use the ExportToPdf method which will take the datatable as the input parameter and then export all your records.
    iTextSharp API can be used to export data to PDF.
    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #761459
    Hi,

    If you want to export your database data to pdf then using third party tool you can achieve it by using ITextSharp, you can download latest iTextSharp dll and add reference to your project and then add namespace to the application and then you can easily perform Exporting data into PDF format.

    Refer below link this will helpful to you how to export data into PDF format.

    https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=export%20data%20to%20pdf%20in%20asp.net

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


Sign In to post your comments