title: PrintDocument and StreamReader in MVC C#
body: <p>I'm using a <code>PrintDocument</code> to set a network printer and paper source. I have a <code>Stream</code> to print.</p>
  
  <p>In this case, only a blank page is printed (on good printer and tray), so how bind the <code>StreamReader</code> to the <code>PrintDocument</code> in MVC4 ? Stream is well populated.</p>
  
  <pre><code>public ActionResult ImprimerEtiquettes(int patientId, int venueId, string uf)
          {
              //do some business logic to have a Stream with parameters
  
              using (StreamReader sr = new StreamReader(fStream))
              {
                  var doc = new PrintDocument();
                  doc.PrinterSettings.PrinterName = "\\\\imp-dsii\\PI91063";
                  PaperSource ps = doc.PrinterSettings.PaperSources[2];
                  doc.DefaultPageSettings.PaperSource = ps;
                  doc.PrintPage += doc_PrintPage;
                  doc.Print();
              }
  
              return Json(new { success = true }, JsonRequestBehavior.AllowGet);
          }
  
          void doc_PrintPage(object sender, PrintPageEventArgs e)
          {
  
          }
  </code></pre>