sayalidzambre 0 Newbie Poster

I want to print .doc ,.docx, .xls, .csv , .xlsx, .rtf documents through java. For that up till now I got following 3 approaches but I have not reached any conclusion.

1. To convert .doc ,.docx, .xls, .csv , .xlsx, .rtf to .pdf (bcoz I am able to print .pdf through java ) using JAVA (may be iText is preferred). These documents contains tables also so not able to convert media from .doc to .pdf.

2. I am able to open .doc file using Activex but I am not able to have a print dialog box on that particular .doc file.


3. There is a link that opens either of these documents(doc ,.docx, .xls, .csv , .xlsx, .rtf ) What my requirement is that on click on this link one document opens, along without this a print dialog box should open on it with having any other click means only one click on the link is required.

Can anybody please help in either of these approaches. It should be done in some client side technology, We are trying with JavaScript (Window.print())