admin管理员组

文章数量:1415100

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.

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.

Share Improve this question edited May 21, 2012 at 13:44 Nealbo 5174 silver badges20 bronze badges asked May 21, 2012 at 9:56 user359187user359187 2,2796 gold badges30 silver badges44 bronze badges 4
  • if you have the knowledge about the format of PDF and it's docs, you can...if you use Blobs...probably, not sure though! – Parth Thakkar Commented May 21, 2012 at 9:58
  • 1 In short you no please, server side will be much easy: forum.jquery./topic/converting-html-to-pdf should help you. or stackoverflow./questions/6896592/… – Tats_innit Commented May 21, 2012 at 9:58
  • I don't have permission to write the server side codes. I need to implement it from client side itself means using the javascript only. – user359187 Commented May 21, 2012 at 10:17
  • Duplicated – David Diez Commented May 21, 2012 at 10:54
Add a ment  | 

1 Answer 1

Reset to default 2

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./products/developer/pdfgeneratorsdkjs/create_pdf_invoice_javascript.html

本文标签: jqueryHTML to PDF conversion using only javascriptStack Overflow