Solved

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

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

759 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

18 Experts available now in Live!

Get 1:1 Help Now