Hi,
I am trying to print HTML data using the javax.print package
Now, i am having problem defining the 'DocFlavor' ...... not sure what to give
here is the code
=============================
String is="<html> <body> <table> <tr> any Print data</tr> </table> </body></html>";
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
PrintService service = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = service.createPrintJob();
Doc doc = new SimpleDoc(is.getBytes(), flavor, null);
job.print(doc, null);
===================================
here it will print every thing including HTML
if i change the DocFlavor to DocFlavor.BYTE_ARRAY.TEXT.HTML.HOST
it throws a invalid flavor exception.....
It would be great if any one could guid me to print html
Thanks a lot