Dear guy
Recently, when I used Aspose. PDf component which version is 18.0 to remove the digital signature that signatured by Adobe. PPKLite standard, It raised following error, “You cannot change this document because it is certified” , and the attachment was the PDF document I tested .
Please help ,thx
bellow is the code by C#
string localPdfInFile = “c:\1.pdf”;
System.IO.MemoryStream mtmTmp = null;
try
{
mtm = new System.IO.MemoryStream(File.ReadAllBytes(localPdfInFile));
pfs = new Aspose.Pdf.Kit.PdfFileSignature();
pfs.BindPdf(mtm);
//first remove all digital signature
if (pfs.IsContainSignature() && (names = pfs.GetSignNames()).Count > 0)
{
foreach (object name in names)
{
pfs.RemoveSignature(name.ToString());
}
mtmTmp = new MemoryStream();
pfs.Save(mtmTmp);
}
else
{
mtmTmp = mtm;
}
}
catch (Exception ex)
{
}
finally
{
pfs = null;
}