title: Print File With .Net
body: <p>I am trying to print via .NET with the following code....</p>
  
  <p><a href="http://support.microsoft.com/kb/322091" rel="nofollow">http://support.microsoft.com/kb/322091</a></p>
  
  <pre><code>OpenFileDialog ofd = new OpenFileDialog();
  if( DialogResult.OK == ofd.ShowDialog(this) )
  {
      // Allow the user to select a printer.
      PrintDialog pd  = new PrintDialog();
      pd.PrinterSettings = new PrinterSettings();
      if( DialogResult.OK == pd.ShowDialog(this) )
      {
          // Print the file to the printer.
          RawPrinterHelper.SendFileToPrinter(pd.PrinterSettings.PrinterName, ofd.FileName);
      }
  }
  </code></pre>
  
  <p>The printer dialog window opens, and the print job is in the queue, however, nothing prints... and I can print otherwise.</p>