M
M
mrgrigo2019-01-25 16:09:54
Java
mrgrigo, 2019-01-25 16:09:54

How to implement printer connection and printing on Android?

Hello.
There is a problem on which it is not possible to find information (at least in my context).
What we have:
1) A printer of an unknown model that can be configured for network operation
2) Wi-Fi network in which the printer is located on the local network
3) The ability to forward the printer's IP to an external network (get the printer's IP address outside)
4) My curves Q
:
How can I connect to this printer and print a PDF document of unknown length?
I read that it is possible to send documents to print using a socket connection to a network printer, but if this is true, then a dead end arises: send a PDF file in byte form or PCL data of this file? If PCL data, what is the best way to perform the conversion?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Falseclock, 2019-01-31
@Falseclock

It is read as a string of PDF content and stupidly send it to an open socket. The printer will figure out what to do with it.
Send "123456" to the socket - it will print it out for you.
Everything is simply banal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question