title: Get and set metadata for itext pdf document
body: <p>I have an iText <code>Document</code> object and I want to write some metadata into it or read from it.<br>
  How can I do that?
  <br></p>
  
  <p>Imagine that the document is beeing passed to a method like :<br></p>
  
  <pre><code>public void prePreccess(Object document) {
      Document pdfDocument =   ((Document) document);
      //What to do here with pdfDocument?
  }
  </code></pre>