I have my data in angular table (JSON) format. Anyone know how to convert it to PDF file.Thanks in advance.
Asked
Active
Viewed 2,086 times
0
-
have tried with any code? if yes then please add here so we can improve. – Dixit Jul 19 '17 at 06:39
-
Try to search for 'javascript pdf generator' and you will find something like [jsPDF](https://github.com/MrRio/jsPDF) or [PDFKit](http://pdfkit.org/) that might work. If you try to convert the table alone you could try [jsPDF with some plugins](https://stackoverflow.com/a/24825130/510711), and use the tables html as a starter.. don't know if it works. – flob Jul 19 '17 at 06:49
-
You could have shown at least a little effort of what you tried and where you failed. If you didn't even know where to start I hope my previous comment helped :-) – flob Jul 19 '17 at 06:50
-
I have tried jsPDF but i'm little bit confused to do it in angular way. @flob – nitheeshsalian Jul 19 '17 at 07:08
-
jsPDF itself must be wrapped in some directive if you want to do it the angular way :-) But maybe the answer from kuns helps you already.. :-) – flob Jul 19 '17 at 07:15
-
Yes It works thanks – nitheeshsalian Jul 19 '17 at 07:26
1 Answers
2
Try out this, angular-save-html-to-pdf
this module converts the HTML to HTML5 canvas and captures the same and converts it to PDF.
Hope this helps you.

kuns
- 44
- 3