Solved

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

Posted on 2014-02-07
2
820 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

718 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