Пример #1
0
echo "OPERATION " . $j++ . "<br />";
echo "Getting job state : " . $ipp->getJobAttributes($job) . "<br />";
echo "Job State: " . $ipp->job_attributes->job_state->_value0 . "<br />";
echo "Job State Reason: " . $ipp->job_attributes->job_state_reasons->_value0 . "<br />";
/* releasing the job */
echo "<br /><br /><br /> TEST 21<br />";
echo "OPERATION " . $j++ . "<br />";
echo "Releasing the job: " . $ipp->releaseJob($job, 'indefinite') . "<br />";
echo "OPERATION " . $j++ . "<br />";
echo "Getting job state : " . $ipp->getJobAttributes($job) . "<br />";
echo "Job State: " . $ipp->job_attributes->job_state->_value0 . "<br />";
echo "Job State Reason: " . $ipp->job_attributes->job_state_reasons->_value0 . "<br />";
/* restarting a job */
echo "<br /><br /><br /> TEST 22<br />";
echo "OPERATION " . $j++ . "<br />";
echo "Restarting the job {$first_job} (if completed!): " . $ipp->restartJob($first_job) . "<br />";
echo "OPERATION " . $j++ . "<br />";
echo "Getting job state : " . $ipp->getJobAttributes($first_job) . "<br />";
echo "Job State: " . $ipp->job_attributes->job_state->_value0 . "<br />";
echo "Job State Reason: " . $ipp->job_attributes->job_state_reasons->_value0 . "<br />";
/* purging jobs for a printer */
echo "<br /><br /><br /> TEST 23<br />";
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/");