I have a printer connected through LAN to the same network that of an android tab. The printing should be a specific format with images and tables. I don't want any dialogs shown during the printing process. The printing process should be automatic.
try {
Socket sock = new Socket("192.168.10.22", 9100);
PrintWriter oStream = new PrintWriter(sock.getOutputStream());
oStream.println("HI,test from Android Device");
oStream.println("\n\n\n");
oStream.println("Printing works!!!");
oStream.println("\n\n\n");
oStream.close();
} catch (Exception e) {
e.printStackTrace();
}
I tried the above code but I can't change the font size or print images