ngilkes 0 Newbie Poster

I have tried printing both a word document on a local drive using java DocFlavor
and have had no success. What DocFlavor do i need to use for Word docs??
I converted the document to a PDF and used the DocFlavor.INPUT_STREAM.PDF and lookupPrintServices(flavor, null) and found no print services. I have a HP P2015n printer connected. I then used DocFlavor.INPUT_STREAM.POSTSCRIPT and found print services Adobe PDF printer, however this still printed garbage and not text.

When using the DocFlavor("application/octet-stream", "java.io.InputStream"), this also did not work when trying to print a word document.
All i seem to get regardless of what method I try, is funny garbage characters out of my printer on alot of wasted paper - just keeps printing and printing.

Help!!!!!!!!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.