I have to print a pdf file using a printer with a specific IP address. I am able to print a specific text but I want to print a file or a html parsed text.
My Code:
try {
Socket sock = new Socket("192.168.0.131", 9100);
PrintWriter oStream = new PrintWriter(sock.getOutputStream());
oStream.println("HI,test from Android Device");
oStream.println("\n\n\n");
oStream.close();
sock.close();
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Many people are suggesting about PDLs but how to convert the pdf to PDL?