$ipp->setAttribute("cpi", 17); // 10,12 or 17. default to 10 //cpi and lpi attributes are CUPS specific $ipp->setAttribute("lpi", 8); // 6 or 8, default: 6 $ipp->setData("./test.txt"); //Path to file. echo "US ASCII file Job status: " . $ipp->printJob() . "<br />"; $ipp->setAttribute("cpi", ""); //reset cpi $ipp->setAttribute("lpi", ""); echo "OPERATION " . $j++ . "<br />"; $ipp->getPrinterAttributes(); printf("Printer state: %s (%s)<br />", $ipp->printer_attributes->printer_state->_value0, $ipp->printer_attributes->printer_state_message->_value0); // Accepting Jobs (CUPS specfic) // echo "OPERATION " . $j++ . "<br />"; echo "Accepting jobs for printer {$printer_uri} (CUPS operation): " . $ipp->cupsAcceptJobs($printer_uri) . "<br />"; /* printing the text file */ echo "OPERATION " . $j++ . "<br />"; echo "US ASCII file Job status: " . $ipp->printJob() . "<br />"; /* getting only default printer's uri (CUPS extention) */ echo "<br /><br /><br />TEST 29<br />"; echo "OPERATION " . $j++ . "<br />"; printf("Default printer URI [CUPS specific]: %s<pre>\n", $ipp->cupsGetDefaults(array('printer-uri-supported'))); printf("Default printer URI is: %s<br />", $ipp->printer_attributes->printer_uri_supported->_value0); print_r($ipp->printer_attributes); echo "</pre>"; /* getting default printer attributes (CUPS extension) */ echo "<br /><br /><br />TEST 30<br />"; echo "OPERATION " . $j++ . "<br />"; echo "Getting default printer attributes [CUPS specific]<br /><pre>\n"; $ipp->setAuthentication($user, $password);