title: Merge memorystreams to one iText document
body: <p>I have four MemoryStreams of data that I want to merge and then open the pdfDocument, without creating a single file. </p>
  
  <p>It's possible to write them down to files and then merge them but that would be bad practice and that can also cause a few issues so I want to avoid that. </p>
  
  <p>However, I can not find a way to merge the MemoryStreams with iText5 for .NET. </p>
  
  <p>Right now, this is how I do it with files:</p>
  
  <pre><code>    private static void ConcatenateDocuments()
      {
          var stream = new MemoryStream();
  
          var readerFrontPage = new PdfReader(Folder + FrontPageName);
          var readerDocA = new PdfReader(Folder + docA);
          var readerDocB = new PdfReader(Folder + DocB);
          var readerAppendix = new PdfReader(Folder + Appendix);
          var pdfCopyFields = new PdfCopyFields(stream);
  
          pdfCopyFields.AddDocument(readerFrontPage);
          pdfCopyFields.AddDocument(readerDocA );
          pdfCopyFields.AddDocument(readerDocB);
          pdfCopyFields.AddDocument(readerAppendix);
          pdfCopyFields.Close();
  
          SavePdf(stream, FilenameReport);
      }
  </code></pre>
  
  <p>Since I need to remove the use of files, I keep the MemoryStream's as the different parts are built from different resources. So I have references to these memorystreams.</p>
  
  <p>How can this be done? </p>