I have a dynamic webpage written in JSP and servlet program where I enter data which gets stored in a database. The data stored is displayed as a table on another webpage on button click. I want my users to download the data on the page which displays the values, either as a PDF or as an excel page. How do I do it?
Asked
Active
Viewed 730 times
0
-
try this https://code.google.com/p/jspdf/ – Aman Gupta Dec 30 '14 at 08:32
-
Q1: Do you want to generate the PDF on the server or from within the browser? Note that jspdf is Javascript. Q2: Do you have PHP available on your server? Q3: What database are you using? – Tom Robinson Jan 04 '15 at 18:36
1 Answers
0
Would you like to Try a plugin for Firefox
https://addons.mozilla.org/EN-uS/firefox/addon/web2pdf-converter/
Or have the data exported as CSV or PDF via PHP - this can then prompt user to save.

Community
- 1
- 1
-
I am aware of the plugin but I want to add a button to my webpage. – iamtheDanger Dec 30 '14 at 08:16
-
Ah... I see. You want to download it? Or do you want your users to download it? – Dec 30 '14 at 08:18
-
I want to add a button for the user that will export the displayed table into a PDF or excel file – iamtheDanger Dec 30 '14 at 08:25