title: iTextSharp "The document has no pages."
body: <p>I'm using iTextSharp to update A PDF's file properties:</p>
  
  <pre><code>FileStream fs = File.Open(@"C:\Developer\C#Projects\BylawSearch\0001.pdf", FileMode.Open);
  Document document = new Document();
  PdfWriter writer = PdfWriter.GetInstance(document, fs);
  document.Open();
  document.AddSubject("Blah");
  document.AddTitle("Blah blah");
  document.AddKeywords("Blah blah blah");
  document.Close();
  </code></pre>
  
  <p>I'm getting a "The document has no pages." error from iTextSharp. Any help appreciated.</p>