Reputation: 33
I need to calculate few values and finally have to save it in a PDF or Word file.
Can we do that ?
We will have one button called 'Calculate & Save in a File'. Once the button is pressed we have to calculate and save it in a PDF or word file.
Is that a possibility? I do not need to display the output(not compulsory)...
Upvotes: 1
Views: 2238
Reputation: 1
do your mean save output at server side or client ? i remember IE or firefox core has a component can render the page to a picture , i think it's maybe has someway to other format. if on the server side , you can call POI interface to write context to pdf directly
but your should manly the pages layout, i think
Upvotes: 0
Reputation: 32953
Yes, just let the button trigger a servlet that uses iText or Apache POI to create the pdf of Word document, set the servlet output content type to the right value (e.g application/msword or application/pdf) and output the generated document.
Upvotes: 0
Reputation: 240898
Yes for PDF you can use JasperReport, iText , check this for word document
Upvotes: 1