// username & password $j = 0; $test = 1; /* printing a large file */ echo "<br /><br /><br />TEST 1<br />"; echo "OPERATION " . $j++ . "<br />"; $ipp->setAttribute("printer-resolution", "1440x720dpi"); $ipp->setAttribute("job-billing", "Thomas"); $ipp->setAttribute("print-quality", "high"); $ipp->setAttribute("scaling", 100); //$ipp->setCopies(2); $ipp->setData('./photo.jpg'); $ipp->setJobName('photo.jpg', true); echo "Printing a large file: " . $ipp->PrintJob() . "<br />"; printf('$ipp->status[0] = %s <br /><br />', $ipp->status[0]); $ipp->unsetAttribute("job-billing"); $ipp->setJobName(); $ipp->setAttribute("scaling", ""); /* getting printer's attributes */ echo "<br /><br /><br />TEST 2<br />"; echo "OPERATION " . $j++ . "<br />"; echo "Getting Printer's attributes: " . $ipp->getPrinterAttributes() . "<br />"; printf('$ipp->status[%s] = %s <br /><br />', count($ipp->status) - 1, $ipp->status[count($ipp->status) - 1]); $timestamp = $ipp->printer_attributes->printer_up_time->_value0; echo "Printer up-time: " . date('Y-m-d H:i:s', $timestamp) . "<br />"; echo "Printer's attributes :<pre>\n"; print_r($ipp->printer_attributes); echo "</pre>"; /* printing a string */ echo "<br /><br /><br /> TEST 3<br />"; echo "OPERATION " . $j++ . "<br />";