Reputation: 558
I am developing a web app using java. I can create reports in excel files for the user to download. Now I am told to give the option of downloading it in a pdf file. Should I use a library to create pdf and write the content or look up a way to convert the excel file into pdf? I think the second option would be easier to develop, but are there any disadvantages on doing this? And if this is the best option, what would be a good library to convert xls to pdf?
Upvotes: 3
Views: 19164
Reputation: 6207
You might check out Apache FOP for PDF creation, and POI for reading the excel. I used both pretty extensively in my previous job.
http://xmlgraphics.apache.org/fop/
Upvotes: 2
Reputation: 67300
Looks like this question will help you: How to convert ms-Excel file to pdf in java
They recommend iText there but you should be aware that Flying Saucer exists. This will let you render html/css as a PDF. It may be a better level of abstraction to work at.
Upvotes: 3