"AT least one signature is invalid" error message after removing signature from pdf using itext
<p>I have a digitally signed pdf with multiple signatures. Now I want to remove only one of the signatures. I am using itext for the same. The code is as follows:</p>

<pre><code>PdfReader reader = new PdfReader(src_path);

PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest_path));


         {
                AcroFields.Item item =        stamper.getAcroFields().getFieldItem(fieldname);

                ClearSignatureDictionary(item.getMerged(0));
                ClearSignatureDictionary(item.getWidget(0));
                ClearSignatureDictionary(item.getValue(0));
            }
        }

 private static void ClearSignatureDictionary(PdfDictionary dic)
  {
    dic.remove(PdfName.AP);
    dic.remove(PdfName.AS);
    dic.remove(PdfName.V);
    dic.remove(PdfName.DV);
    dic.remove(PdfName.SV);
    dic.remove(PdfName.FF);
    dic.put(PdfName.F, new PdfNumber(4));
 }
</code></pre>

<p>But when I open the document with the removed signature, it gives me the following error on Acrobat reader
"At least one of the signatures is invalid" </p>