After spending an afternoon messing with the 1.4 print api I decided to search the Java discussion group only to find numerous posts detailing the same problem I have;
To print you first need to create a Doc object.
fis = a FileInputStream object relating to a .txt file
textFlavor = a supported DocFlavor object using plain text as the data type
Problem is, me (and everyone else) is told that their printer does not support the plain text DocFlavor.
Here is the output of the getSupportedFlavors method;
I can print a .gif using the 2nd DocFlavor in the list above.
Any ideas? Will this be fixed?
Thanks
Dom.
To print you first need to create a Doc object.
Code:
Doc doc = new SimpleDoc(fis, textFlavor, null);
fis = a FileInputStream object relating to a .txt file
textFlavor = a supported DocFlavor object using plain text as the data type
Problem is, me (and everyone else) is told that their printer does not support the plain text DocFlavor.
Here is the output of the getSupportedFlavors method;
Code:
image/gif; class="[B"
image/gif; class="java.io.InputStream"
image/gif; class="java.net.URL"
image/jpeg; class="[B"
image/jpeg; class="java.io.InputStream"
image/jpeg; class="java.net.URL"
image/png; class="[B"
image/png; class="java.io.InputStream"
image/png; class="java.net.URL"
application/x-java-jvm-local-objectref; class="java.aw
application/x-java-jvm-local-objectref; class="java.aw
application/octet-stream; class="[B"
application/octet-stream; class="java.net.URL"
application/octet-stream; class="java.io.InputStream"
I can print a .gif using the 2nd DocFlavor in the list above.
Any ideas? Will this be fixed?
Thanks
Dom.