Example #1
0
echo "OPERATION " . $j++ . "<br />";
$ipp->setUserName("test");
$ipp->setPrinterURI($printer_uri);
// Set printer URI here
echo "Purge-Jobs for printer {$printer_uri}: " . $ipp->purgeJobs() . "<br />";
/* purging jobs for all printers */
echo "<br /><br /><br /> TEST 24<br />";
echo "OPERATION " . $j++ . "<br />";
$ipp->setPrinterURI("ipp://localhost:631/printers/");
// => all printers
echo "Purge-Jobs (all printers): " . $ipp->purgeJobs() . "<br />";
/* pausing printer */
echo "<br /><br /><br /> TEST 25<br />";
echo "OPERATION " . $j++ . "<br />";
$ipp->setPrinterURI($printer_uri);
echo "Pausing Printer {$printer_uri}, then sleep 1 second: " . $ipp->pausePrinter() . "<br />";
sleep(1);
echo "OPERATION " . $j++ . "<br />";
echo "Getting printer's attributes: " . $ipp->getPrinterAttributes() . "<br />";
echo "Printer State: " . $ipp->printer_attributes->printer_state->_value0 . "<br />";
/* Resuming printer */
echo "<br /><br /><br /> TEST 26<br />";
echo "OPERATION " . $j++ . "<br />";
echo "Resuming Printer {$printer_uri}, then sleep 1 second: " . $ipp->resumePrinter() . "<br />";
sleep(1);
echo "OPERATION " . $j++ . "<br />";
echo "Getting printer's attributes: " . $ipp->getPrinterAttributes() . "<br />";
echo "Printer State: " . $ipp->printer_attributes->printer_state->_value0 . "<br />";
/* setting printer's attributes */
echo "<br /><br /><br /> TEST 27<br />";
echo "OPERATION " . $j++ . "<br />";