title: Extracting a page results in NullReferenceException
body: <p>I'm trying to test extraction of a single page from a PDF document, but I'm getting  a <code>NullReferenceException</code> whenever I try.</p>
  
  <pre><code>var document = new Document();
  var stream = new MemoryStream();
  var writer = PdfWriter.GetInstance(document, stream);
  
  document.Open();
  document.Add(new Paragraph("This is page 1."));
  document.NewPage();
  document.Add(new Paragraph("This is page 2."));
  document.Close();
  
  var copystream = new MemoryStream();
  var copy = new PdfCopy(document, copystream);
  copy.Open();
  var reader = new PdfReader(stream.ToArray());
  var page = copy.GetImportedPage(reader, 2);
  copy.AddPage(page);
  copy.Close(); // code throws exception here
  </code></pre>
  
  <p>I've tried adding <code>writer.CloseStream = false</code>, but I still end up with the same <code>NullReferenceException</code>:</p>
  
  <pre><code>Object reference not set to an instance of an object.
     at iTextSharp.text.Document.get_Left()
     at iTextSharp.text.pdf.PdfDocument.SetNewPageSizeAndMargins()
     at iTextSharp.text.pdf.PdfDocument.NewPage()
     at iTextSharp.text.pdf.PdfDocument.Close()
     at iTextSharp.text.pdf.PdfCopy.Close()
     at iTextTest.Controllers.HomeController.Index() in line 41
  </code></pre>