Reputation: 2279
Is there any way convert an HTML page to a PDF document using javascript only?
I know this can be done using PHP or Java etc. but i don't have the option to use these languages in my project.
Upvotes: 1
Views: 12359
Reputation: 2878
Disclaimer: I am affiliated with ByteScout
Bytescout has new javascript product "PDF Generator SDK for Javascript" which is capable of generating PDF files 100% on client side, probably you may generate PDF with text, images, graphics. Full HTML formatting is not supported, but you can use <b>, <i>, <u> html tags inside text to use rich formatting (new version will include support for <font> and <a href> html tags inside text)
Demo of invoice with logo and table generated: http://bytescout.com/products/developer/pdfgeneratorsdkjs/create_pdf_invoice_javascript.html
Upvotes: 2