To print a page of web page
<p>I want to print the page content in the printer. I use the following code to write the content to printer:</p>

<pre><code>&lt;?php
$printer = "\\\\Pserver.php.net\\printername";
if($ph = printer_open($printer))
{
   // Get file contents
   $fh = fopen("filename.ext", "rb");
   $content = fread($fh, filesize("filename.ext"));
   fclose($fh);

   // Set print mode to RAW and send PDF to printer
   printer_set_option($ph, PRINTER_MODE, "RAW");
   printer_write($ph, $content);
   printer_close($ph);
}
else "Couldn't connect...";
?&gt;
</code></pre>

<p>but I found out that it returns an error like <code>printer_open($printer) is undefined function</code>. Where's the fault in the code?</p>
