title: put generated pdf file without saving it on the server
body: <p>I have code (in a .ashx-file) that generates a PDF file from a PDF template. The generated pdf gets personalized with a name and a code. I use <a href="http://itextpdf.com/" rel="nofollow">iTextSharp</a> to do so.</p>
  
  <p>This is the code:</p>
  
  <pre><code>using (var existingFileStream = new FileStream(fileNameExisting, FileMode.Open))
      using (var newFileStream = new FileStream(fileNameNew, FileMode.Create))
      {
          var pdfReader = new PdfReader(existingFileStream);
          var stamper = new PdfStamper(pdfReader, newFileStream);
  
          var form = stamper.AcroFields;
          var fieldKeys = form.Fields.Keys;
  
          form.SetField("Name", name);
          form.SetField("Code", code);
  
          stamper.FormFlattening = true;
  
          stamper.Close();
          pdfReader.Close();
      }
  
  context.Response.AppendHeader("content-disposition", "inline; filename=zenith_coupon.pdf");
  context.Response.TransmitFile(fileNameNew);
  context.Response.ContentType = "application/pdf";
  </code></pre>
  
  <p>This works, but it saves the file on the server. I don't want to do that because there're going to be a lot of people downloading the PDF file and the server will be full in no time.</p>
  
  <p>So my question is, how can I generate a PDF with iTextSharp without saving it and put it to the user?</p>