Question

I want to print file from android application.For the same , after searching on google,I found some useful information that i will have to use IPP (Internet Printing Protocol) with HTTP. And I am new to ipp but i have worked with HTTP. So can anybody help me for the same ? Can anybody give me some useful information OR links? Thanks in advance ?

Was it helpful?

Solution

You need to make an HTTP PUT request with some special features, you must:

  • use the port 631 instead of 80 (unless it's explicitly specified of course).
  • rewrite the url in the header (i.e. ipp:// => http://).
  • protocol ID is IPP/1.1.
  • you must authenticate via a challenge method.

OTOH, the request/response format used in the body is binary, so you should really really read the RFC. Besides that, it's quite simple, all you need is job and printer URIs, and then you just send properly encoded data.

OTHER TIPS

Using ipp-client-kotlin printing a file can be implemented like this:

IppPrinter(URI.create("ipp://colorjet.local/ipp/printer"))
    .printJob(File("A4-blank.pdf"))
    .waitForTermination()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top