How to export a html page to pdf in client side using JavaScript or jQuery?

jsPDF has a HTML renderer but it is in the early stages:

https://github.com/mrrio/jsPDF

http://parall.ax/products/jspdf

Another solution might be https://github.com/eKoopmans/html2pdf.js

But the best solution is the one from mujaffars. User AJAX and a stable PDF library written in PHP like FPDF, PDFLib, TCPDF and others.


Well, if I have got your question properly then u need to Export a Table Data as PDF?

If Yes, then please see datatables.js with simple example here.

Also, look into use BytescoutPDF.js (Bytescout PDF Generator for JavaScript) to draw PDF invoice and JSPDF you can get the details here.