I'm trying to edit a signed PDF without compromising the signature.
In Adobe Acrobat Reader I'm able to insert a note in the signed PDF without compromising the signature (Acrobat Reader gives a warning reporting that the note has been inserted after the signature).
I tried to modify the PDF using GDPicture (code below), but Acrobat Reader reports an error in the signature after doing that.
Is there a way to add annotation to the signed PDF as Acrobat Reader does ?
Code: Select all
GdPicturePDF oGdPicturePDF = new GdPicturePDF();
oGdPicturePDF.LoadFromFile(myFile, true);
oGdPicturePDF.SelectPage(1);
string font_res_name = oGdPicturePDF.AddTrueTypeFont("Arial", false, false, false);
oGdPicturePDF.SetTextMode(PdfTextMode.PdfTextModeFill);
oGdPicturePDF.SetTextSize(30);
oGdPicturePDF.SetFillColor(255, 0, 0, 0);
oGdPicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomRight);
oGdPicturePDF.SetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
oGdPicturePDF.DrawText(font_res_name, 1, 1, "Hello World!");
oGdPicturePDF.SaveToFile(_fileSelezionato.ToUpper().Replace(".PDF", "_modified.PDF"));
oGdPicturePDF.CloseDocument();