title: remove text from header and footer using iText c#
body: <p>is there a way to remove some text from header and footer in PDF using iText 7 in c#?</p>
  <p>I found this code snippet from iText site, but apparently a license is need:</p>
  <pre><code>public void manipulatePdf(String dest) throws IOException {
      //Load the license file to use cleanup features
      LicenseKey.loadLicenseFile(System.getenv(&quot;ITEXT7_LICENSEKEY&quot;) + &quot;/itextkey-multiple-products.xml&quot;);
      PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest));
      List cleanUpLocations = new ArrayList();
      cleanUpLocations.add(new PdfCleanUpLocation(1, new Rectangle(97, 405, 383, 40), Color.GRAY));
      PdfCleanUpTool cleaner = new PdfCleanUpTool(pdfDoc, cleanUpLocations);
      cleaner.cleanUp();
      pdfDoc.close();
  }
  </code></pre>
  <p>Link: <a href="https://kb.itextpdf.com/home/it7kb/faq/how-to-remove-text-from-a-pdf" rel="nofollow noreferrer">https://kb.itextpdf.com/home/it7kb/faq/how-to-remove-text-from-a-pdf</a></p>
  <p>Anyone has some code sample on removing text from header and footer?</p>
  <p>PS: if someone knows how to edit and save the same file using iText will be great help</p>
  <p><strong>EDIT 1</strong>
  I am adding the text myself in the PDF. I use the example found here in this page: <a href="https://kb.itextpdf.com/home/it7kb/faq/how-to-add-text-as-a-header-or-footer" rel="nofollow noreferrer">https://kb.itextpdf.com/home/it7kb/faq/how-to-add-text-as-a-header-or-footer</a>.</p>
  <p>The question now is, how to remove the text I entered in the pdf after it has been saved to the file? I want to open the pdf back again and remove that text.</p>
  <p><strong>Edit2:</strong>
  This <a href="https://github.com/itext/i7js-examples/blob/develop/src/main/java/com/itextpdf/samples/sandbox/parse/RemoveContentInRectangle.java" rel="nofollow noreferrer">post</a> does not answer my question. The code inside <code>manipulatePdf</code> method is exactly as the one I have pasted above initially. Classes like <code>PdfCleanUpTool</code> are not found in the community edition.</p>