Home : Creating a PDF with ASP.NET. A PDF solution that many can use
Q10447 - INFO: Creating a PDF with ASP.NET. A PDF solution that many can use

Creating a PDF with ASP.NET. A PDF solution that many can use

Working for a staffing firm, I have written all of our front-end software to run over the Internet so we can share common databases with our smaller branch offices. The biggest problem we faced, however, was reporting. How do we get live documents (applications, etc.) to generate themselves when an applicant sits down at the kiosk and fills out their on-line employment application? While we're doing a great job of capturing the data, we still need an applicant to sign the application.

I tried a number of things, but the limits seem to be:
If I could produce it fast, it was an HTML form derivative and looked terrible when printed.
If I could produce it looking right, it was clunky and slow.

Remember, we are not talking about tabular data or an spreadsheet. We want the application with our logo to be processed.
Finally, I settled on Adobe PDF. The formatting looks good and the files are thin. Most users have it on their system, and all my users do. So I searched for ways to pass data from HTML page to PDF files. I wanted to pass data directly from my HTML form to a database while generating the field data into the PDF file for display or printing.

I found PDF Duo .NET component. It converts HTML to PDF. It is native .NET component coded with pure C#. Also PDF Duo .NET does not require any additional software.

www.duodimension.com/html_pdf_asp.net/component_html_pdf.aspx
This is the link to the home page of PDF Duo .NET component.

Step 1.
Download the component and add reference to PDF Duo .NET in your project.

Step 2.
Create the HTML form. Save data to database if it is needed. Create the PDF using main class HTML to PDF. Instead of API functions for generation a PDF, use HTML syntax:

DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
conv.BasePath = MapPath("~/");
conv.PageFormat = DuoDimension.ePageFormat.A4;
conv.PageOrientation = DuoDimension.ePageOrientation.Portrait;
conv.OpenHTML("Create HTML string using tags for text formatting”); conv.SavePDF(MapPath("~/pdf/") + "report.pdf");
preport.InnerText = "The report has been created.";
Save your work to wherever you want on your Web server.
Also the PDF Duo .NET component can show resulted PDF without saving it on the disk.
So without having to be an expert at PDF, this is my answer for the moment.

Author:

Our goal is to provide high-quality components for converting between file formats. We develop tools that convert formats such as PDF, HTML, DOC, XLS, RTF, XML. Our long-term vision is to continually create new and innovative solutions featuring greater ease of use and higher quality than the competition.

Article Source: http://www.articlesbase.com

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 12/15/2009.
Last Modified on 12/15/2009.
Last Modified by Administrator.
Article has been viewed 247 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article