Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to export html content to PDF from client side?

I'm facing an issue trying to add my website export to PDF function.

When browsing the net, i found some solution, but non of them is just printing the page as is to PDF.

http://parall.ax/products/jspdf can't take pure html and make it into pdf file.

I know there is many questions regarding the issue, but there is no one clear answer to the question: Is it possible to export html content to PDF from client side.

if it's possible i will be glad to know how.

if not please suggest how should i do it from server side (java / php / node.js) .

please note that the page contains highcharts charts and images: you can have a look in here:

http://angularjs.liadlivnat.com:8080/campaign

like image 876
Liad Livnat Avatar asked Jul 17 '14 06:07

Liad Livnat


People also ask

How can download HTML page as PDF using jQuery?

Explanation: The Export Button has been assigned a jQuery click event handler. When the Export Button is clicked, the HTML Table is converted into a HTML5 Canvas using html2canvas plugin and then the HTML5 Canvas will be exported to PDF using the pdfmake plugin.


1 Answers

This is a nice JS library for HTML to PDF conversion > https://github.com/MrRio/jsPDF

like image 127
Srikanta Avatar answered Oct 24 '22 18:10

Srikanta