Create PDF and Email it

Mosteck

Active member
Joined
Nov 23, 2008
Messages
31
Location
Toronto
Programming Experience
3-5
I'm looking for a way to create a PDF of a web page form and then emailing it to a set group of users (or even one user).

I've never done this and just recently started looking into it, but every solution requires buying a software package. Due to my limited budget, I was hoping that there is an easier solution.

Thanks in advance!
 
One of the most complete libraries for PDF is iTextSharp and of course it is absolutely free.

I've come across this in my search already, but it seems fairly complicated and most people don't have too much information on it.

I already have a webpage that comes up for the user to printout (looks pretty good) but in trying to cut down on paper, I was looking for a way to PDF this existing page and email it automatically to the person/people responsible for approving it.

Will ItextSharp be able to do this? Or do I need to recreate the form in Adobe with fields and have the program update it, or redraw it using iTextSharp?

Thanks for your assistance
 
Hi,


Try to use PDF Duo .NET component.

It converts HTML to PDF. This light component will be very appropriate for your ASP.NET web site.

You can
+ convert a web page into PDF or
+ just a part of the page into the PDF.

Also with the help of PDF Duo .NET you can simply create a PDF. For that pass a HTML string instead of HTML file.

For sending an email with attachment use standart .NET class MailMessage (use VS help or other dedicated topics):
VB.NET:
   Dim mailMessage As New MailMessage()
   mailMessage.From = txtFrom.Text
   mailMessage.To = txtTo.Text
   ...
   Dim myAttachment As MailAttachment = New MailAttachment([I][COLOR="DarkGreen"]pathofsavedPDF[/COLOR][/I])
   myMail.Attachments.Add(myAttachment)
   ...
 
Yes, not free which is a concern on my side.

Thank you for all the information everyone, I'm going to start playing around with itextsharp and I'm sure you'll hear from me shortly again! LOL..
 
Back
Top