Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

looking for a solution for generating pdf with client side (angular js)

I am looking for a solution to generate pdf from (html + css + javascript) using AngularJs.

I tested two solutions:

  • jsPDF (it does not take the css)
  • Shrimp (based on Ruby)

which do not work for me.

How can I do it?

like image 495
Abder-Edrs Avatar asked Apr 28 '14 08:04

Abder-Edrs


1 Answers

After all this, I discovered the excellent PhantomJS.

The binary was easily installed on the server with no additional dependencies required, and came with a great deal of example code, including a working ‘print to PDF’ function out-of-the-box. With some minor tweaks, we customized the script for our use case, and had a PDF copy of our webpages in minutes. PhantomJS has been around since 2011 and is used by a variety of open source products, listed on their websit

like image 55
Abder-Edrs Avatar answered Oct 13 '22 19:10

Abder-Edrs