Solved

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

Posted on 2014-02-07
2
783 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now