Click here to Skip to main content
14,866,384 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a div wich contains background image,logo,table.

My requirement is I have to generate pdf file using this div and send as mail.
I have to send the pdf file along with div background.

using jquery.

Any one can suggest me...

Thank u
Posted

jsPDF[^] seems to be the plug-in to download pdfs using jQuery.

You can have a try.
Comments
thatraja 26-Dec-13 2:53am
   
Is this opensource/freeware?
   
It has a GitHub project - jsPDF - Generate PDF files in client-side JavaScript[^]. But I have not used it. I read some blogs and came to know that it is the only plug-in available for creating pdf in jQuery.
thatraja 26-Dec-13 4:18am
   
/*it is the only plug-in available for creating pdf in jQuery.*/
That's why I asked you. If it's opensource(no restrictions to use on commercial), then it's good.
   
Yeah opensource. :)
thatraja 26-Dec-13 5:04am
   
Take a 5!
   
Many many thanks thatraja... :)
I would say, this is not the best idea. Why not sending HTML instead? Less trouble, more flexible and adequate format, especially if you already have HTML, besides, HTML is directly rendered by all non-nonsense mail programs, PDF is not, and a PDF viewer may not be even installed.

However, if you still need it, you can use iText, or its .NET port, iTextSharp:
http://en.wikipedia.org/wiki/IText[^],
http://itextpdf.com/[^],
http://sourceforge.net/projects/itextsharp/[^].

I provided the link to iText as well, as most documentation is for Java, but you can easily understand it.

—SA
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900