title: Cant not get updated values in pdf?
body: <p>I'm using c# to write pdf file.
  with the following code</p>
  
  <pre><code>MemoryStream mem = new MemoryStream();
  Document doc = new Document(PageSize.A4, 25, 25, 30, 30);
  doc.SetMargins(40f, 40f, 40f, 20f);
  PdfWriter writer = PdfWriter.GetInstance(doc, mem);
  byte[] generated_pdf_file = mem.GetBuffer();
  mem.Close();
  
  return generated_pdf_file;
  </code></pre>
  
  <p>all things worked for except when any data changed, the pdf print the original one. It means cant not get new instance of the new entered data.</p>
  
  <p>any help?</p>