Solved

Export data from ASP.Net/C# application to a .pdf file

Posted on 2014-02-07
2
797 Views
Last Modified: 2014-02-09
Is there a way to export data from a web page in asp.net to a .pdf file? I hope to do this without any 3rd party tools. I am working with VS 2012 and SQL Server 2008. The data all resides in SQL Server, but users will be viewing selected data in an ASP.Net web page and then exporting to a .pdf file. Can this be done? Thanks.
0
Comment
Question by:dodgerfan
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39842287
I hope to do this without any 3rd party tools.
Sure you can do this without 3rd party tools, if you have the time to implement the PDF specification in your C# code   ; )

Since the data resides in SQL Server, you might consider using SQL Server Reporting Services  (SSRS) to generate a report, which can be exported to various formats including PDF and Excel. I think the code to do such would be dependent on what your SSRS setup provides. Our report server offers web service endpoints that we can call; in searching around the 'Net, it seems that invoke a report using proxy classes also.

Outside of SSRS, you might consider using something like iTextSharp. I have not used it myself, but I know that it's a popular library for working with PDF documents. You could create a fillable PDF template (using Adobe, if you have it available), and then use iTextSharp to fill in each field.
0
 

Author Closing Comment

by:dodgerfan
ID: 39845428
Ok, thanks for the help. I'll take a look at both suggestions.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question