Hello,
I’m having an issue: I need to clear usage rights/signature from .pdf file, but that file is protected with password. I’m unable to use BindPdf(Stream, string) because of its protection level. And using BindPdf(Stream) causes an error “invalid password”.
How could I solve this?
using (Aspose.Pdf.Facades.PdfFileSignature pdfSign = new Aspose.Pdf.Facades.PdfFileSignature())<span style=“font-family: “Courier New”;”>{
//pdfSign.BindPdf(vResultedStream, vPassword); //unaccessable
pdfSign.BindPdf(vResultedStream); //Error “invalid password”
try {
if ((pdfSign.ContainsUsageRights()))<span style=“font-family: “Courier New”;”>{
pdfSign.RemoveUsageRights();
}
}
catch (Exception ex){
string vMessage = ex.Message.ToString();
}
pdfSign.Document.Save(vNoSignatureStream);
}
pdf password: DCS
Aspose version: 11.2