I have a requirement in which i have to read a file (pdf,text,doc,docx,ppt) and display its preview on mouse hover or mouse-on event on the link of that document in java/javascript (Same as Google webpage preview or crawler ). Is it possible to achieve that requirement using java. Thanks in Advance.
Asked
Active
Viewed 1,769 times
0
-
Possible duplicate [here](http://stackoverflow.com/q/2950786/1285418) – Pau Kiat Wee Jun 12 '12 at 11:53
1 Answers
1
The Office docs can be converted to PDF using Microsoft Office and its capacity to save a document as a PDF. You can find multiple samples on using the Office API to print as a PDF. For the pdf format you can use pdfbox and its feature to convert a pdf to an image and you can display the image of the first page as a preview.
Html and txt can be displayed directly or you can convert them to PDF as well.
Regards, Mihai

mihaisimi
- 1,911
- 13
- 15