Applying signature on ‘Edit password’ protected document is changing the security method to “No Security” and Security Method drop down will be disabled.
Please see attached image file “Before.png” and “After.png”.
Using AsposePDF v18.10.0.0 Library
Code Snip set:
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(“Aspose.Pdf.lic”);
FileStream sigFile = new FileStream(pbxFile, FileMode.Open);
PdfFileSignature pdfSign = new PdfFileSignature();
pdfSign.BindPdf(pdfFile);
PKCS7 signature = new PKCS7(sigFile, Password);
Aspose.Pdf.Rectangle AnnotRect = new Aspose.Pdf.Rectangle(80, 540, 270, 560);
System.Drawing.Rectangle rect = AnnotRect.ToRect();
pdfSign.Sign(page, reason, “Contact”, location, true, rect, signature);
pdfSign.Save();
Before.png (18.8 KB)
After.png (18.5 KB)
Please let me know…