title: Removing Watermark from a PDF using iTextSharp
body: <p>I added a watermark on pdf using Pdfstamper. Here is the code:</p>
  
  <pre><code>for (int pageIndex = 1; pageIndex &lt;= pageCount; pageIndex++)
  {
      iTextSharp.text.Rectangle pageRectangle = reader.GetPageSizeWithRotation(pageIndex);
      PdfContentByte pdfData = stamper.GetUnderContent(pageIndex);
      pdfData.SetFontAndSize(BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, 
          BaseFont.NOT_EMBEDDED), watermarkFontSize);
      PdfGState graphicsState = new PdfGState();
      graphicsState.FillOpacity = watermarkFontOpacity;
      pdfData.SetGState(graphicsState);
      pdfData.SetColorFill(iTextSharp.text.BaseColor.BLACK);
      pdfData.BeginText();
      pdfData.ShowTextAligned(PdfContentByte.ALIGN_CENTER, "LipikaChatterjee", 
          pageRectangle.Width / 2, pageRectangle.Height / 2, watermarkRotation);
      pdfData.EndText();
  }
  </code></pre>
  
  <p>This works fine. Now I want to remove this watermark from my pdf. I looked into iTextSharp but was not able to get any help. I even tried to add watermark as layer and then delete the layer but was not able to delete the content of layer from the pdf. I looked into iText for layer removal and found a class OCGRemover but I was not able to get an equivalent class in iTextsharp.</p>