{"id":377168,"date":"2024-05-26T21:00:48","date_gmt":"2024-05-26T21:00:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=377168"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=377168","title":{"rendered":"<span>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 IPP \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 \u0432 Android<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/caa\/bb9\/b13\/caabb9b13c10686ecc0fb95879eadcdb.jpg\" alt=\"\u0410 \u0441\u0435\u0439\u0447\u0430\u0441, \u043c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442\u043e\u0432. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u043b\u0435\u043d\u0442\u044b. \" title=\"\u0410 \u0441\u0435\u0439\u0447\u0430\u0441, \u043c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442\u043e\u0432. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u043b\u0435\u043d\u0442\u044b. \" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/caa\/bb9\/b13\/caabb9b13c10686ecc0fb95879eadcdb.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0410 \u0441\u0435\u0439\u0447\u0430\u0441, \u043c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442\u043e\u0432. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u043b\u0435\u043d\u0442\u044b. <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0448\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c IPP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043f\u0435\u0447\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. <\/p>\n<\/li>\n<\/ol>\n<p>  \u0418 \u0432\u043e\u0442 <strong>\u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong>, \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f.1 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f.2, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u043f\u0435\u0447\u0430\u0442\u0438 \u0410\u043d\u0434\u0440\u043e\u0438\u0434 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043d\u0430\u0448 \u043f\u0440\u0438\u043d\u0442\u0435\u0440. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u0438\u0437 mDNS \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 IPP. <\/p>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e IPP \u0436\u0438\u0432\u0435\u0442 \u043d\u0430 631 \u043f\u043e\u0440\u0442\u0443. \u0421\u043b\u0430\u0432\u043e \u0431\u043e\u0433\u0443 \u0434\u043b\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430 \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0422\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 \u043c\u0435\u043d\u044c\u0448\u0435 1024 (\u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0443\u0442\u043e\u0432\u0430\u043d\u0438\u044f).<\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445. \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0430\u043d\u0430\u043b\u043e\u0433 \u0438\u0437 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f 10631.  <\/p>\n<p>IPP \u0436\u0438\u0432\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0430\u043f\u0447\u0435 \u043a\u043e\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0441 (package org.apache.hc.core5). <\/p>\n<p>  <strong>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430,<\/strong> \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0445 \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0438 \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 &#8212; \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430 \u0432\u0441\u0435\u0445 ip \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430. <\/p>\n<pre><code class=\"java\">ServerBootstrap serverBootstrap = ServerBootstrap.bootstrap(); serverBootstrap.setListenerPort(PORT); \/\/ serverBootstrap.setCanonicalHostName(\"10.0.0.104\");  \/\/ \u0437\u0430\u043d\u0443\u043b\u0438\u043b \u043c\u0435\u0442\u043e\u0434 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 RequestHandlerRegistry serverBootstrap.setSocketConfig(SocketConfig.custom()                                 .setSoTimeout(300, TimeUnit.SECONDS)                                 .setTcpNoDelay(true)                                 .setSoReuseAddress(true).build());<\/code><\/pre>\n<p>mDNS \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0440\u043b\u0430 (hostname, ip4 \u0438 ip6)<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2f9\/3cd\/ff6\/2f93cdff6393e86fc4563285f393d229.png\" width=\"319\" height=\"79\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f9\/3cd\/ff6\/2f93cdff6393e86fc4563285f393d229.png\"\/><\/figure>\n<p>\u041f\u043b\u044e\u0441, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0443 \u0441 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e 127.0.0.1<\/p>\n<p><strong>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0412\u0441\u0435 \u044d\u0442\u0438 \u0432\u0435\u0449\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435. \u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e Android-9.local. \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c ip \u0432 DHCP \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043c\u0430\u043a &#8212; \u0430\u0434\u0440\u0435\u0441.  <\/p>\n<p>\u0421 \u043c\u043e\u0435\u0439 \u0442\u043e\u0447\u043a\u0435 \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0439\u043f\u0438 \u0437\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c dhcp. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/65b\/62c\/062\/65b62c062b4ad07c15efefe0938821c6.jpg\" width=\"1080\" height=\"2340\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/65b\/62c\/062\/65b62c062b4ad07c15efefe0938821c6.jpg\" data-blurred=\"true\"\/><\/figure>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u0445\u0443\u043a \u043d\u0430 rp \u0443\u0440\u043b<\/p>\n<pre><code class=\"java\">serverBootstrap.register(\"\/\"+RP, (request, response, context) -> { ....    \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c       if(!request.containsHeader(CONTENT_TYPE)){        \/\/ NO CONTENT TYPE;        return;      }     if(!(\"application\/ipp\".equalsIgnoreCase(request.getHeader(CONTENT_TYPE).getValue()))){         \/\/ WRONG CONTENT TYPE         return;     }   \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e     Operation operation;     IppPacketData ippPacketData;     int ippVer;     try {        HttpEntity entity = request.getEntity();        IppInputStream responseInput = new IppInputStream(entity.getContent());        ippPacketData = new IppPacketData(responseInput.readPacket(), responseInput);        ippVer = ippPacketData.getPacket().getVersionNumber();        operation = ippPacketData.getPacket().getOperation();                     lInfo(\"oper:\"+ operation.getName());      }catch (Exception e){       lError(e.getMessage());      return;    }  ....   }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442 HP <\/p>\n<p><a href=\"https:\/\/github.com\/HPInc\/jipp\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/HPInc\/jipp<\/a><\/p>\n<p>\u0421 \u043c\u043e\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f. \u041e\u043d\u0430 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u043e\u043c Pantum (\u043f\u0430\u0434\u0430\u043b\u0430 \u043d\u0430 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0433\u0435\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430) \u0438 \u0440\u0443\u0433\u0430\u043b\u0430\u0441\u044c \u043d\u0430 cups MacOS \u043f\u0440\u0438 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435 USB \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 (\u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d \u0434\u0432\u0430\u0436\u0434\u044b). \u0422\u043e\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0438 \u0433\u043b\u0443\u0448\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u044d\u043a\u0441\u0435\u043f\u0448\u0435\u043d\u043e\u0432. <\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043d\u0435 \u043c\u043d\u0435 \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430. \u041a\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b \u0432 \u0434\u043e\u043a\u0435\u0440 \u043e\u0431\u0440\u0430\u0437 cups. \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435, \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434 npm.  \u041d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 5 \u043a\u043e\u043c\u0430\u043d\u0434, \u043d\u043e \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0432\u0441\u0435\u0433\u043e 2\u0445. <\/p>\n<pre><code class=\"java\">operationsSupported.of(   Operation.printJob, \/\/ \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430   Operation.validateJob,   \/\/   Operation.createJob,   \/\/   Operation.sendDocument,   Operation.cancelJob,   Operation.getJobAttributes,   \/\/    Operation.getJobs,         Operation.getPrinterAttributes, \/\/ \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430   \/\/    Operation.cancelMyJobs,   \/\/    Operation.closeJob,   Operation.identifyPrinter ),<\/code><\/pre>\n<p> \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u0443\u0442 \u0441 \u043e\u0442\u043b\u043e\u0432\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0447\u0430\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0447\u0430\u0442\u0438, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440 <strong>PrinterState.processing <\/strong>\u0438 \u0441\u0435\u043a\u0443\u043d\u0434 \u0447\u0435\u0440\u0435\u0437 5 \u0441\u043d\u043e\u0432\u0430 <strong>idle<\/strong>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/b28\/11e\/aeb\/b2811eaeb5a9ec9f02b638d6474e332a.jpg\" width=\"1080\" height=\"2340\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b28\/11e\/aeb\/b2811eaeb5a9ec9f02b638d6474e332a.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0432\u044b\u0448\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430, \u0447\u0442\u043e \u043e\u043d \u0445\u043e\u0447\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0435. <\/p>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e<\/p>\n<p>\u0430) \u0432 document-format-supported \u043e\u0434\u0438\u043d pdf \u0438\/\u0438\u043b\u0438 pwg. \u042f \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u044e \u0442\u0443\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e PCLm &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0430\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0434\u0444 \u0444\u043e\u0440\u043c\u0430\u0442, \u0433\u0434\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0434\u043e 128 \u0442\u043e\u0447\u0435\u043a \u0432\u044b\u0441\u043e\u0442\u043e\u0439. <\/p>\n<p>\u0431) printer-name <\/p>\n<p> \u0432) uuid<\/p>\n<p>\u0433) printer-location <\/p>\n<p>\u0434) media-supported \u0445\u043e\u0442\u044f \u0431\u044b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u0443\u043c\u0430\u0433\u0438<\/p>\n<p>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e. <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e JPL , PDL<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/817201\/\"> https:\/\/habr.com\/ru\/articles\/817201\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption>\u0410 \u0441\u0435\u0439\u0447\u0430\u0441, \u043c\u044b \u0441 \u0412\u0430\u043c\u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442\u043e\u0432. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043e\u043b\u0435\u043d\u0442\u044b. <\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0448\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c IPP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043f\u0435\u0447\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. <\/p>\n<\/li>\n<\/ol>\n<p>  \u0418 \u0432\u043e\u0442 <strong>\u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/strong>, \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u043c\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f.1 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f.2, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u043f\u0435\u0447\u0430\u0442\u0438 \u0410\u043d\u0434\u0440\u043e\u0438\u0434 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043d\u0430\u0448 \u043f\u0440\u0438\u043d\u0442\u0435\u0440. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0440\u0430\u043d\u0435\u0435, \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u0438\u0437 mDNS \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 IPP. <\/p>\n<p>\u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e IPP \u0436\u0438\u0432\u0435\u0442 \u043d\u0430 631 \u043f\u043e\u0440\u0442\u0443. \u0421\u043b\u0430\u0432\u043e \u0431\u043e\u0433\u0443 \u0434\u043b\u044f \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430 \u044d\u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043e\u0431\u043e\u0439\u0442\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0422\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 \u043c\u0435\u043d\u044c\u0448\u0435 1024 (\u0442\u043e\u0447\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0443\u0442\u043e\u0432\u0430\u043d\u0438\u044f).<\/p>\n<p>\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445. \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0430\u043d\u0430\u043b\u043e\u0433 \u0438\u0437 \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f 10631.  <\/p>\n<p>IPP \u0436\u0438\u0432\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 HTTP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0430\u043f\u0447\u0435 \u043a\u043e\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0441 (package org.apache.hc.core5). <\/p>\n<p>  <strong>\u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430,<\/strong> \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0445 \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0438 \u0434\u043e\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 &#8212; \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u043d\u0430 \u0432\u0441\u0435\u0445 ip \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430. <\/p>\n<pre><code class=\"java\">ServerBootstrap serverBootstrap = ServerBootstrap.bootstrap(); serverBootstrap.setListenerPort(PORT); \/\/ serverBootstrap.setCanonicalHostName(\"10.0.0.104\");  \/\/ \u0437\u0430\u043d\u0443\u043b\u0438\u043b \u043c\u0435\u0442\u043e\u0434 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 RequestHandlerRegistry serverBootstrap.setSocketConfig(SocketConfig.custom()                                 .setSoTimeout(300, TimeUnit.SECONDS)                                 .setTcpNoDelay(true)                                 .setSoReuseAddress(true).build());<\/code><\/pre>\n<p>mDNS \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0440\u043b\u0430 (hostname, ip4 \u0438 ip6)<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u043b\u044e\u0441, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0443 \u0441 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e 127.0.0.1<\/p>\n<p><strong>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong> \u0412\u0441\u0435 \u044d\u0442\u0438 \u0432\u0435\u0449\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435. \u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e Android-9.local. \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c ip \u0432 DHCP \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043c\u0430\u043a &#8212; \u0430\u0434\u0440\u0435\u0441.  <\/p>\n<p>\u0421 \u043c\u043e\u0435\u0439 \u0442\u043e\u0447\u043a\u0435 \u0437\u0440\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0439\u043f\u0438 \u0437\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c dhcp. <\/p>\n<figure class=\"full-width\"><\/figure>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u0445\u0443\u043a \u043d\u0430 rp \u0443\u0440\u043b<\/p>\n<pre><code class=\"java\">serverBootstrap.register(\"\/\"+RP, (request, response, context) -> { ....    \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c       if(!request.containsHeader(CONTENT_TYPE)){        \/\/ NO CONTENT TYPE;        return;      }     if(!(\"application\/ipp\".equalsIgnoreCase(request.getHeader(CONTENT_TYPE).getValue()))){         \/\/ WRONG CONTENT TYPE         return;     }   \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e     Operation operation;     IppPacketData ippPacketData;     int ippVer;     try {        HttpEntity entity = request.getEntity();        IppInputStream responseInput = new IppInputStream(entity.getContent());        ippPacketData = new IppPacketData(responseInput.readPacket(), responseInput);        ippVer = ippPacketData.getPacket().getVersionNumber();        operation = ippPacketData.getPacket().getOperation();                     lInfo(\"oper:\"+ operation.getName());      }catch (Exception e){       lError(e.getMessage());      return;    }  ....   }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442 HP <\/p>\n<p><a href=\"https:\/\/github.com\/HPInc\/jipp\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/HPInc\/jipp<\/a><\/p>\n<p>\u0421 \u043c\u043e\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f. \u041e\u043d\u0430 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u043e\u043c Pantum (\u043f\u0430\u0434\u0430\u043b\u0430 \u043d\u0430 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0433\u0435\u043e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430) \u0438 \u0440\u0443\u0433\u0430\u043b\u0430\u0441\u044c \u043d\u0430 cups MacOS \u043f\u0440\u0438 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435 USB \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 (\u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u0443\u043a\u0430\u0437\u0430\u043d \u0434\u0432\u0430\u0436\u0434\u044b). \u0422\u043e\u0436\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0444\u043e\u0440\u043a\u0430\u0442\u044c \u0438 \u0433\u043b\u0443\u0448\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u044d\u043a\u0441\u0435\u043f\u0448\u0435\u043d\u043e\u0432. <\/p>\n<p>\u041a\u0430\u043a \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043d\u0435 \u043c\u043d\u0435 \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430. \u041a\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b \u0432 \u0434\u043e\u043a\u0435\u0440 \u043e\u0431\u0440\u0430\u0437 cups. \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u043f\u0438\u0442\u043e\u043d\u0435, \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434 npm.  \u041d\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 5 \u043a\u043e\u043c\u0430\u043d\u0434, \u043d\u043e \u0430\u043d\u0434\u0440\u043e\u0438\u0434 \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 \u0432\u0441\u0435\u0433\u043e 2\u0445. <\/p>\n<pre><code class=\"java\">operationsSupported.of(   Operation.printJob, \/\/ \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430   Operation.validateJob,   \/\/   Operation.createJob,   \/\/   Operation.sendDocument,   Operation.cancelJob,   Operation.getJobAttributes,   \/\/    Operation.getJobs,         Operation.getPrinterAttributes, \/\/ \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430   \/\/    Operation.cancelMyJobs,   \/\/    Operation.closeJob,   Operation.identifyPrinter ),<\/code><\/pre>\n<p> \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u0443\u0442 \u0441 \u043e\u0442\u043b\u043e\u0432\u043e\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0447\u0430\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0447\u0430\u0442\u0438, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440 <strong>PrinterState.processing <\/strong>\u0438 \u0441\u0435\u043a\u0443\u043d\u0434 \u0447\u0435\u0440\u0435\u0437 5 \u0441\u043d\u043e\u0432\u0430 <strong>idle<\/strong>.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0432\u044b\u0448\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430, \u0447\u0442\u043e \u043e\u043d \u0445\u043e\u0447\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0435. <\/p>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e<\/p>\n<p>\u0430) \u0432 document-format-supported \u043e\u0434\u0438\u043d pdf \u0438\/\u0438\u043b\u0438 pwg. \u042f \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u044e \u0442\u0443\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e PCLm &#8212; \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043a\u0430\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0434\u0444 \u0444\u043e\u0440\u043c\u0430\u0442, \u0433\u0434\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u043e\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043f\u043e\u043b\u043e\u0441\u043a\u0438 \u0434\u043e 128 \u0442\u043e\u0447\u0435\u043a \u0432\u044b\u0441\u043e\u0442\u043e\u0439. <\/p>\n<p>\u0431) printer-name <\/p>\n<p> \u0432) uuid<\/p>\n<p>\u0433) printer-location <\/p>\n<p>\u0434) media-supported \u0445\u043e\u0442\u044f \u0431\u044b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u0443\u043c\u0430\u0433\u0438<\/p>\n<p>\u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e. <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e JPL , PDL<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/817201\/\"> https:\/\/habr.com\/ru\/articles\/817201\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-377168","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=377168"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/377168\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}