title: PHP printing blank page
body: <p>I use printer extension in PHP. I use virtual printer print PDF. It works with browser, but prints a blank page when use PHP code !!</p>
  
  <p>This is code </p>
  
  <pre><code>&lt;?php
  //$printer = "Two Pilots Demo Printer";
  $printer = "CutePDF Writer";
  if($ph = printer_open($printer))
  {
  
      // Set print mode to RAW and send PDF to printer
  
  
      printer_set_option($ph, PRINTER_MODE, "RAW");
      printer_set_option($ph,PRINTER_TEXT_ALIGN, PRINTER_TA_RIGHT); 
      printer_start_doc($ph, "My doc".rand(1,3));//name doc
      printer_start_page($ph);
  
      printer_write($ph,"Hello World !");
  
      printer_end_page($ph);
      printer_end_doc($ph);
      printer_close($ph);
  }
  else
  {
      "Couldn't connect...";
  };
  </code></pre>