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.
This is the link to the home page of PDF Duo .NET component.
Download the component and add reference to PDF Duo .NET in your project.
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.
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 from articlesbase.com
Find More ASP.NET Articles