my requirement print file android device without using cloud based service.
i have been able achieve using "raw" print protocol i.e sending file printer's ip address @ port 9100. here code snippet that:
client = new socket(ip,port); //port 9100 byte[] mybytearray = new byte[(int) file.length()]; //create byte array file fileinputstream = new fileinputstream(file); bufferedinputstream = new bufferedinputstream(fileinputstream); bufferedinputstream.read(mybytearray, 0, mybytearray.length); //read file outputstream = client.getoutputstream(); outputstream.write(mybytearray, 0, mybytearray.length); //write file output stream byte byte outputstream.flush(); bufferedinputstream.close(); outputstream.close();
the problem "raw" printing protocol there no way status printer.
so, read ipp , ldr using can status printer.
i have tried find way implement them using android had no success. have went through this answer had no success in finding solution.
it helpful if can guide me on how implement ipp or ldr in android.
thanks in advance!
you may use android-printservice implements local printer-protocol. don't have implement ipp in application. unfortunately existing service-apps don't seem work perfect. neither setup nor printing work expect (compared ios printing).
if still want implement ipp read question's answer.
Comments
Post a Comment