I have my data in angular table (JSON) format. Anyone know how to convert it to PDF file.Thanks in advance.
-
have tried with any code? if yes then please add here so we can improve.Dixit– Dixit2017-07-19 06:39:40 +00:00Commented Jul 19, 2017 at 6:39
-
Try to search for 'javascript pdf generator' and you will find something like jsPDF or PDFKit that might work. If you try to convert the table alone you could try jsPDF with some plugins, and use the tables html as a starter.. don't know if it works.flob– flob2017-07-19 06:49:38 +00:00Commented Jul 19, 2017 at 6: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– flob2017-07-19 06:50:22 +00:00Commented Jul 19, 2017 at 6:50
-
I have tried jsPDF but i'm little bit confused to do it in angular way. @flobnitheeshsalian– nitheeshsalian2017-07-19 07:08:50 +00:00Commented Jul 19, 2017 at 7: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– flob2017-07-19 07:15:11 +00:00Commented Jul 19, 2017 at 7:15
|
Show 1 more comment
1 Answer
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.