title: Add multiple pages to pdf form with iTextSharp
body: <p>I am trying to fill out a pdf form and the form could have multiple pages of the same form, so instead of writing each one to disk I want to create one pdf document in memory with all the pages.</p>
  
  <p>I have seen plenty of example on adding pages from an existing pdf file with <code>FileStream</code> but nothing really for filling out forums and adding it to <code>MemoryStream</code>.</p>
  
  <p>basically I need to fill out the forum with <code>PdfStamper</code> then append that form to a "master" <code>MemoryStream</code> because I dont want to write it to file.</p>
  
  <p>this is basically what I have so far</p>
  
  <pre><code>List&lt;Person&gt; people = arson.getPeople();
  MemoryStream main = new MemoryStream();
  foreach (Person person in people )
  {
      PdfReader reader = new PdfReader(pathToPdf);
      MemoryStream mem = new MemoryStream();
      PdfStamper stamper = new PdfStamper(reader, mem);
  
      //fill in forum with data from person then append
  
  }
  </code></pre>
  
  <p>filling out the form is not the problem its just appending a new page to the <code>main</code> stream so that they are all in the same document. How can I add multiple pages in memory a not write it to disk first?</p>