<i id='Tpuzw'><tr id='Tpuzw'><dt id='Tpuzw'><q id='Tpuzw'><span id='Tpuzw'><b id='Tpuzw'><form id='Tpuzw'><ins id='Tpuzw'></ins><ul id='Tpuzw'></ul><sub id='Tpuzw'></sub></form><legend id='Tpuzw'></legend><bdo id='Tpuzw'><pre id='Tpuzw'><center id='Tpuzw'></center></pre></bdo></b><th id='Tpuzw'></th></span></q></dt></tr></i><div id='Tpuzw'><tfoot id='Tpuzw'></tfoot><dl id='Tpuzw'><fieldset id='Tpuzw'></fieldset></dl></div>

    <tfoot id='Tpuzw'></tfoot>
    1. <small id='Tpuzw'></small><noframes id='Tpuzw'>

    2. <legend id='Tpuzw'><style id='Tpuzw'><dir id='Tpuzw'><q id='Tpuzw'></q></dir></style></legend>
      • <bdo id='Tpuzw'></bdo><ul id='Tpuzw'></ul>

      从 PHP 应用程序通过网络打印

      时间:2023-10-04
      • <legend id='FkeaQ'><style id='FkeaQ'><dir id='FkeaQ'><q id='FkeaQ'></q></dir></style></legend>

          <bdo id='FkeaQ'></bdo><ul id='FkeaQ'></ul>
          1. <tfoot id='FkeaQ'></tfoot>

            <small id='FkeaQ'></small><noframes id='FkeaQ'>

              <tbody id='FkeaQ'></tbody>
          2. <i id='FkeaQ'><tr id='FkeaQ'><dt id='FkeaQ'><q id='FkeaQ'><span id='FkeaQ'><b id='FkeaQ'><form id='FkeaQ'><ins id='FkeaQ'></ins><ul id='FkeaQ'></ul><sub id='FkeaQ'></sub></form><legend id='FkeaQ'></legend><bdo id='FkeaQ'><pre id='FkeaQ'><center id='FkeaQ'></center></pre></bdo></b><th id='FkeaQ'></th></span></q></dt></tr></i><div id='FkeaQ'><tfoot id='FkeaQ'></tfoot><dl id='FkeaQ'><fieldset id='FkeaQ'></fieldset></dl></div>

                本文介绍了从 PHP 应用程序通过网络打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我有一组打印机通过网络连接,并为每台打印机分配了静态 IP.

                I have a set of printers connect over a network with Static IP assigned to each printer.

                现在我在 Linux 服务器上运行了一个 PHP Web 应用程序,它需要通过网络将打印作业发送到这些打印机.

                Now i have a PHP web application running on a linux server which needs to send print jobs, to these printer over the network.

                这是否可以使用 lpr 或 cups 以及我该如何处理.

                Is this possible using lpr or cups and how do i go about it.

                推荐答案

                您可以从这里使用 LPR 打印机类:

                You could use the LPR Printer class from here:

                http://www.phpclasses.org/package/2540-PHP-Abtraction-for-printing-documents.html

                示例:

                <?php 
                include("PrintSend.php");
                include("PrintSendLPR.php");
                
                $lpr = new PrintSendLPR(); 
                $lpr->setHost("10.0.0.17"); //Put your printer IP here 
                $lpr->setData("C:\wampp2\htdocs\print\test.txt"); //Path to file, OR string to print. 
                
                $lpr->printJob("someQueue"); //If your printer has a built-in printserver, it might just accept anything as a queue name.
                ?>
                

                这篇关于从 PHP 应用程序通过网络打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:如何在 PHP 中打印页面以使用与 window.print() 相同 下一篇:用 PHP 打印到打印机

                相关文章

                最新文章

                1. <legend id='6yqdK'><style id='6yqdK'><dir id='6yqdK'><q id='6yqdK'></q></dir></style></legend>

                      <bdo id='6yqdK'></bdo><ul id='6yqdK'></ul>
                  1. <tfoot id='6yqdK'></tfoot>

                    <small id='6yqdK'></small><noframes id='6yqdK'>

                    <i id='6yqdK'><tr id='6yqdK'><dt id='6yqdK'><q id='6yqdK'><span id='6yqdK'><b id='6yqdK'><form id='6yqdK'><ins id='6yqdK'></ins><ul id='6yqdK'></ul><sub id='6yqdK'></sub></form><legend id='6yqdK'></legend><bdo id='6yqdK'><pre id='6yqdK'><center id='6yqdK'></center></pre></bdo></b><th id='6yqdK'></th></span></q></dt></tr></i><div id='6yqdK'><tfoot id='6yqdK'></tfoot><dl id='6yqdK'><fieldset id='6yqdK'></fieldset></dl></div>