{"id":300680,"date":"2020-03-24T21:00:15","date_gmt":"2020-03-24T21:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300680"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300680","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 \u044d\u0442\u0438\u043a\u0435\u0442\u043e\u043a XPrinter \u043d\u0430 Linux \u0432 VMware Workstation"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493960\/\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 CentOS \u0431\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421 Linux.<\/p>\n<p>  \u0420\u0435\u0448\u0430\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0438\u0437 php \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u043c, \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u043d\u0430 VMware.<\/p>\n<p>  XPrinter \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0438 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u0434 windows \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 XP-460B \u0441 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438 \u0434\u043e 108 \u043c\u043c.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kb\/nb\/gf\/kbnbgfyypq5nwyake2w2hg2wegi.jpeg\"><\/div>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 Linux \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043a \u043d\u0435\u043c\u0443 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u043a\u0440\u0430\u0439\u043d\u0435 \u0440\u0435\u0434\u043a\u043e, \u0438\u0441\u043a\u0430\u043b \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043c\u0430\u043d\u0443\u0430\u043b\u044b \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435, \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 cups. \u0423 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u043f\u043e USB, \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u0430\u0445, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u043c\u0430\u043b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.<\/p>\n<ul>\n<li>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0441 \u0441\u0430\u0439\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f xprintertech.com, \u043e\u043d\u0438 \u0438\u0434\u0443\u0442 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u043e\u043c \u0434\u043b\u044f Windows, Mac \u0438 Linux\n<p>  \u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <b>4 inch Label Printer Drivers<\/b>. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c, XP-460B \u0443\u0436\u0435 \u0441\u043d\u044f\u0442 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u043f\u043e\u043d\u044f\u043b \u043a \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043f\u043e \u0445\u043b\u0435\u0431\u043d\u044b\u043c \u043a\u0440\u043e\u0448\u043a\u0430\u043c \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 XP-470B.<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u0432 windows, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u0431\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mq\/_x\/cj\/mq_xcj-xg_3khujjepoijh-9q-k.png\"><\/div>\n<\/li>\n<li>\u0414\u043b\u044f Linux \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 1 \u0444\u0430\u0439\u043b 4BARCODE. \u042d\u0442\u043e \u00ab2 \u0432 1\u00bb \u0444\u0430\u0439\u043b, bash \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0441 tar \u0430\u0440\u0445\u0438\u0432\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0441\u0435\u0431\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0432 cups. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043d\u0443\u0436\u0435\u043d bzip2 (\u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0438 80 \u043c\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440)\n<pre><code class=\"bash\">yum install cups yum install bzip2 chmod 744 .\/4BARCODE sh .\/4BARCODE service cups start <\/code><\/pre>\n<\/li>\n<li>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c <a href=\"http:\/\/localhost\" rel=\"nofollow\">localhost<\/a>:361 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0434\u0435\u043b\u0430\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0432 windows. \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \/etc\/cups\/cupsd.conf:\n<pre><code class=\"xml\">Listen localhost:631 \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 Listen *:631 &lt;Location \/&gt;   Order allow,deny   Allow localhost   Allow 192.168.1.*   &lt;\/Location&gt; &lt;Location \/admin&gt;   Order allow,deny   Allow localhost   Allow 192.168.1.* &lt;\/Location&gt; <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c 631 \u043f\u043e\u0440\u0442 \u0432 firewall (\u0438\u043b\u0438 \u0432 iptables):<\/p>\n<pre><code class=\"bash\">firewall-cmd --zone=public --add-port=631\/tcp --permanent firewall-cmd --reload <\/code><\/pre>\n<\/li>\n<li>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043f\u043e IP \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <a href=\"https:\/\/192.168.1.5\" rel=\"nofollow\">192.168.1.5<\/a>:631\/admin\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0438\u043d\u0442\u0435\u0440 (\u043d\u0443\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 root \u0438 \u043f\u0430\u0440\u043e\u043b\u044c)<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uq\/vo\/dq\/uqvodquq5zrhfxu0dqezx3ulmky.png\"><\/div>\n<\/li>\n<li>\u0415\u0441\u0442\u044c 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 LPD \u0438 \u0447\u0435\u0440\u0435\u0437 samba.\n<ol>\n<li>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 LPD, \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 \u0432 windows (\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Windows), \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440.\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yu\/2y\/41\/yu2y417h1xccrcfpysa9jkpr4se.png\"><\/div>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 cups \u0432\u0432\u043e\u0434\u0438\u043c lpd:\/\/192.168.1.52\/Xprinter_XP-460B, \u0433\u0434\u0435 192.168.1.52 \u2014 IP \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0440\u0438\u043d\u0442\u0435\u0440, Xprinter_XP-460B \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043e\u0431\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 windows<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lz\/ay\/tk\/lzaytk-6ywoldviksu9cyxaksfw.png\"><\/div>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 4BARCODE =&gt; 4B-3064TA<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/if\/ml\/ig\/ifmligg_hdt17kwsmlrzildy_5a.png\"><\/div>\n<p>  <b>\u0412 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0438 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c!<\/b> \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0420\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432 \u0437\u0430\u0434\u0430\u043d\u0438\u0438 \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dv\/7v\/ud\/dv7vud9j8yxo8a6g2guhswt_shw.png\"><\/div>\n<p>  <b>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u2014 \u0433\u043e\u0442\u043e\u0432\u043e!<\/b><\/li>\n<li>\u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c samba, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c cups, \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 cups, \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0438\u0434\u0430 smb:\/\/user:password@192.168.1.52\/Xprinter_XP-460B. \u0413\u0434\u0435, user \u2014 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 windows, \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d \u043f\u0430\u0440\u043e\u043b\u044c, \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0438 \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043b \u043f\u0440\u043e\u0431\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c:<\/p>\n<pre><code class=\"bash\">lpr -P Xprinter_XP-460B -o media=Custom.100x102mm test.txt<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u044b 100\u0445100 \u043c\u043c, 2 \u043c\u043c \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e. \u0420\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0430\u043c\u0438 3 \u043c\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 103 \u043c\u043c, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0434\u0432\u0438\u0433 \u043b\u0435\u043d\u0442\u044b, \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0442\u0440\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0443. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 LPD \u2014 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0442\u0435\u0440, \u0444\u043e\u0440\u043c\u0430\u0442 ESC\/P0S \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c, \u0441\u0435\u043d\u0441\u043e\u0440 \u043d\u0435 \u043a\u0430\u043b\u0438\u0431\u0440\u0443\u0435\u0442 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438.<\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 php. \u0415\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 cups, \u043c\u043d\u0435 \u043f\u0440\u043e\u0449\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0447\u0435\u0440\u0435\u0437 exec();<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 ESC\/P0S \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0432 pdf \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 tFPDF<\/p>\n<pre><code class=\"php\">require_once($_SERVER[&quot;DOCUMENT_ROOT&quot;] . &quot;\/tfpdf\/tfpdf.php&quot;); $w = 100; $h = 100; $number = 59; $pdf = new tFPDF('P', 'mm', [$w, $h]); $pdf-&gt;SetTitle('Information'); $pdf-&gt;AddFont('Font', 'B', $_SERVER[&quot;DOCUMENT_ROOT&quot;] . '\/fonts\/opensans-bold.ttf', true); $pdf-&gt;SetTextColor(0,0,0); $pdf-&gt;SetDrawColor(0,0,0);  $pdf-&gt;AddPage('P'); $pdf-&gt;SetDisplayMode('real','default'); $pdf-&gt;Image($_SERVER[&quot;DOCUMENT_ROOT&quot;]. '\/images\/logo_site.png',$w - 4 - 28,$h - 13,28.1,9.6,'');  $pdf-&gt;SetFontSize(140); $pdf-&gt;SetXY(0,24); $pdf-&gt;Cell($w,$h - 45, $number,0,0,'C',0);  $pdf-&gt;SetFontSize(1); $pdf-&gt;SetTextColor(255,255,255); $pdf-&gt;Write(0, $number);  $pdf-&gt;Output('example.pdf','I'); <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\">exec('php label.php | lpr -P Xprinter_XP-460B -o media=Custom.100x102mm'); <\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5w\/uy\/ly\/5wuylysbgybnsmuhf2hwg_vz54o.png\"><\/div>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e. \u0423\u0431\u0438\u043b \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 2 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/div>\n<p> \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\/post\/493960\/\"> https:\/\/habr.com\/ru\/post\/493960\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493960\/\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 CentOS \u0431\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u041e\u0421 Linux.<\/p>\n<p>  \u0420\u0435\u0448\u0430\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0438\u0437 php \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438 \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430 \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447 \u043f\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u043c, \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439 \u043d\u0430 VMware.<\/p>\n<p>  XPrinter \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0438 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u0447 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u043e\u0434 windows \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 XP-460B \u0441 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u044d\u0442\u0438\u043a\u0435\u0442\u043a\u0438 \u0434\u043e 108 \u043c\u043c.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kb\/nb\/gf\/kbnbgfyypq5nwyake2w2hg2wegi.jpeg\"><\/div>\n<p>  <\/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-300680","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300680","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=300680"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300680\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}