Adobe Acrobat Message

Hi,

I’m trying to insert a signature field into a PDF document.

That works, but when I try to edit the document, Adobe Acrobat gives me the message: “This document is signed and cannot be edited.”

However, there’s no signature yet. There’s only an empty signature field. What can I do?

Thanks and regards,
Henry

My Code:
var pdfdoc = new Aspose.Pdf.Document();
var page = pdfdoc.Pages.Add();
page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment(“Hello Henry!”));

var fe = new FormEditor(pdfdoc);
fe.AddField(FieldType.Signature, “SigField”, “My Signature”, 1, 100, 700, 400, 750);
pdfdoc.Save(“myfile.pdf”);

@HenryE
Hi, thank you for reporting
I checked your case, it seems that in this case you prepare the document to be signed and for such cases it is locked in order to not be changed before being signed with actual signature - I would suppose it works in such case as empty signature that still prevents document from being changed, therefore you get a message from Adobe
I looked up a bit, seems it should work in pair with PdfFileSignature like following:


        static void signature_issue()
        {
            var pdfdoc = new Aspose.Pdf.Document();
            var page = pdfdoc.Pages.Add();
            page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment("Hello Henry!"));

            var fe = new FormEditor(pdfdoc);
            fe.AddField(FieldType.Signature, "SigField", "My Signature", 1, 100, 700, 400, 750);
            pdfdoc.Save(OutputFolder + "myfile.pdf");


            using (var pdfSign = new PdfFileSignature())
            {
                pdfSign.BindPdf(OutputFolder + "myfile.pdf");
                var signature = new PKCS1(InputFolder + "41456.pfx", "test");
                pdfSign.Sign("SigField", "Reason", "Contact", "Location", signature);
                pdfSign.Save(OutputFolder + "myfile_signed.pdf");
            }
        }

myfile_signed.pdf (539.7 KB)

myfile.pdf (2.1 KB)