Frage

I need to make a print on cups printer from my PHP web application. Is there a PHP API for cups? In my server shell_exec() and all such functions are strictly disabled. So I cant print using lpr. Please advice

War es hilfreich?

Lösung

Now it's available. We can do it by PHP::PRINT::IPP
Sample Code

<?php require_once(PrintIPP.php); $ipp = new PrintIPP(); $ipp->setHost("localhost"); $ipp->setPrinterURI("/printers/epson"); $ipp->setData("./testfiles/test-utf8.txt"); // Path to file. $ipp->printJob(); ?>

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top