title: Print PDF file in PHP using sockets
body: <p>I want to print PDF file using sockets (because of script speed). I found this on other thread:</p>
  
  <pre><code>&lt;?php 
  if(($conn = fsockopen('192.168.10.112',9100,$errno,$errstr))===false){
      echo 'Connection Failed' . $errno . $errstr;
  }
  
  $data = &lt;&lt;&lt;HERE
      ^XA
      ^FT50,200
      ^A0N,200,200^FDTEST^FS
      ^FT50,500
      ^A0N,200,200^FDZebra Printer^FS
      ^XZ
  HERE;
  
  #send request
  $fput = fputs($conn, $data, strlen($data));
  
  #close the connection
  fclose($conn);
  ?&gt;
  </code></pre>
  
  <p>How to print PDF file using this method?</p>