How can we print an MS Word document from Java ???
We can print .txt files, but while printing .doc, it gives junk chars in print out when we set
DocFlavor docFlavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
I tried,
1.DocFlavor docFlavor = new DocFlavor("application/msword", "java.io.InputStream");
2. DocFlavor docFlavor = new DocFlavor("application/vnd.ms-word", "java.io.InputStream");
and got PrintJobFlavorException
It would be helpful if any one could help me out..
Re: How can we print an MS Word document from Java
Hi,
Even We have some requirement to print the Word document from JAVA. How can we achieve that?
One way we thought is to convert word to pdf and then pdf to ps to print the document.
Can anyone suggest some other solution or how to convert word to pdf from JAVA
Re: How can we print an MS Word document from Java
http://jakarta.apache.org and look for POI.
It's not perfect in that it doesn't understand all capabilities of MS Word but it understands pretty much all core capabilities.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.