Operations
cupsGetDefault()
Get default printer attributes. Parsing is same as getPrinterAttributes() operation of
standard PrintIPP class. Note that printer history is given as RFC3382 "collection",
which needs a different handling.
Example:
$ipp->cupsGetDefaults(array('all'));
echo "</pre>\nPrinter historic for default printer:\n";
$histo = $ipp->printer_attributes->printer_state_history->_value1;
$idx_histo = "_indice0";
for ($idx = 0 ; isset($histo->$idx_histo) ; $idx ++) {
echo "<h3>next event:</h3>\n";
foreach ($histo->$idx_histo as $key => $value) {
if (is_object($value))
if ($key != 'printer_state_time')
printf("%s: %s<br />",$key,$value->_value0);
else
printf("%s: %s<br />",$key,date('Y-m-d H:i:s',$value->_value0));
$idx_key = "_key". ($key + 1);
}
$idx_histo = '_indice'. ($idx + 1);
}
cupsRejectJobs($printer_uri,$printer_state_message=false)
Causes CUPS rejecting jobs for given printer.
cupsAcceptJobs($printer_uri)
Causes CUPS accepting jobs for given printer.
cupsGetPrinters()
Alias for getPrinters().