directly print with php
<p>I try to print directly with php library php_printer.dll, my problem is that my printer print strange words instead of PDF file. </p>

<p>Here is my code:</p>

<pre><code>    &lt;?php

    $printer = ("Epson Printer");
    if($ph = printer_open($printer))
    {
       $file = file_get_contents('receipt.pdf', FILE_USE_INCLUDE_PATH);
       printer_write($ph, $file);
       printer_close($ph);
    }
    else "Couldn't connect...";
    ?&gt;
</code></pre>

<p><strong>UPDATE</strong><br>
Now i try with this code on Windows 7, but print not start:</p>

<pre><code>shell_exec( 'print /d:EPSON MFC-J265W c:\file.txt');
</code></pre>
