1

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.

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! Commented May 21, 2012 at 9:58
  • 1
    In short you no please, server side will be much easy: forum.jquery.com/topic/converting-html-to-pdf should help you. or stackoverflow.com/questions/6896592/… 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. Commented May 21, 2012 at 10:17
  • Duplicated Commented May 21, 2012 at 10:54

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks it will really helpful. I have checked it and working in almost all browsers even in ie. But it is not open source product anyway i will check by downloading the trial version. Once gain thanks.
What if I am using Javascript to update inline ID using getelementbyid? How would that work? stackoverflow.com/questions/25082395/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.