title: Get all metadata from an existing PDF using iText7
body: <p>How can I retrieve all metadata stored in a PDF with iText7?</p>
  
  <pre><code>using (var pdfReader = new iText.Kernel.Pdf.PdfReader("path-to-a-pdf-file"))
  {
      var pdfDocument = new iText.Kernel.Pdf.PdfDocument(pdfReader);
      var pdfDocumentInfo = pdfDocument.GetDocumentInfo();
  
      // Getting basic metadata
      var author = pdfDocumentInfo.GetAuthor();
      var title = pdfDocumentInfo.GetTitle();
  
      // Getting everything else
      var someMetadata = pdfDocumentInfo.GetMoreInfo("need-a-key-here");
      // How to get all metadata ?
  }
  </code></pre>
  
  <p>I was using this with iTextSharp but I can't figure how to do it with the new iText7.</p>
  
  <pre><code>using (var pdfReader = new iTextSharp.text.pdf.PdfReader("path-to-a-pdf-file"))
  {
      // Getting basic metadata
      var author = pdfReader.Info.ContainsKey("Author") ? pdfReader.Info["Author"] : null;
      var title = pdfReader.Info.ContainsKey("Title") ? pdfReader.Info["Title"] : null;
  
      // Getting everything else
      var metadata = pdfReader.Info;
      metadata.Remove("Author");
      metadata.Remove("Title");
  
      // Print metadata
      Console.WriteLine($"Author: {author}");
      Console.WriteLine($"Title: {title}");
  
      foreach (var line in metadata)
      {
          Console.WriteLine($"{line.Key}: {line.Value}");
      }
  }
  </code></pre>
  
  <p>I am using version 7.1.1 of iText7.</p>