} else { $ipp = new BasicIPP(); } $ipp->with_exceptions = $handle_ipp_exceptions; $ipp->handle_http_exceptions = $handle_http_exceptions; $ipp->setHost($host); if ($paths) { $ipp->paths = $paths; } $ipp->setLanguage("en-us"); // various tests for ipv6 and SSL you can enable instead //$ipp->setHost("ip6-localhost"); //$ipp->setHost("127.0.0.1"); //$ipp->setHost("::1"); //$ipp->ssl = 1; $ipp->setPort($port); //$ipp->setPort("65537"); // uncomment to generate http error // set the value to your printer $ipp->setPrinterURI($printer); $ipp->debug_level = $debug; // Debugging $ipp->setLog($logfile, 'file', $debug); // logging $ipp->setUserName($username); // setting user name for server if ($username && $password) { $ipp->setAuthentication($username, $password); } /* printing an utf-8 file */ $ipp->setDocumentName("test"); $ipp->setCharset('utf-8');