title: How to Print any document in a SELECTED printer
body: <p>I would like to print any document such as pdf,word,excel or text files in a selected printer using .net .I have got success to do such printing in the default printer .The only issue now is to print in the selected printer.</p>
  
  <p>Here is the code for the printing.</p>
  
  <pre><code>public bool Print(string FilePath)
      {
          if (File.Exists(FilePath)) {
              if (ShellExecute((System.IntPtr )1, "Print", FilePath, "", Directory.GetDirectoryRoot(FilePath), SW_SHOWNORMAL).ToInt32() &lt;= 32) {
                  return false;
              } else {
                  return true;
              }
          } else {
              return false;
          }
      }
  </code></pre>