1

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)...

3 Answers3

1

Yes for PDF you can use JasperReport, iText , check this for word document

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
0

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.

fvu
  • 32,488
  • 6
  • 61
  • 79
0

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

Kang
  • 1