I am developing an application in which from my mobile I am sending files to the WiFi printer by IP address and port number, which are .txt, .png, .jpg, .doc. They should be
Jpg, png, and doc would need to be parsed into a file format the printer recognizes such as pdf or PS. Then the file could be streamed to the printer.
I know it is a bit old question. Android 4.4 provides you this functionality.
Please check these instructions