I am trying to add a digital signature to a field with the following code, and getting the following exception:
System.ApplicationException: 'Signature field 'SignatureField1[0]' is not defined.'
I am using the following code:
var signature = new PdfFileSignature(pdfDocument);
using var fileStream = File.OpenRead("C:/users/conner.phillis/documents/output.pfx");
var pkcs = new PKCS7(fileStream, "password") { ShowProperties = false };
signature.SignatureAppearance = "C:/users/conner.phillis/downloads/keymark.jpg";
signature.Sign(signatureField.FullName, pkcs);
signature.Save("C:/temp/output.pdf");
The exception is coming from the last line, the save method. The full name of the field is
topmostSubform[0].Page1[0].SignatureField1[0]
The name of the field is null for some reason. Is this some sort of bug or am I doing something wrong?
Attached pdf: 401k Enrollment fillable_v5.pdf (100.4 KB)
@conner.phillis
The code snippet looks fine and we were also able to replicate the issue in our environment while testing it using 22.7 version of the API. Therefore, an issue as PDFNET-52150 has been logged in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.
We are sorry for the inconvenience.
I am not a paid support customer. Is there any way for me to watch the status of this ticket? or a time until it is expected to be complete?
@conner.phillis
You can check the ticket status at the bottom of this thread inside Issue Status box. Along with that, we will also inform you in case of any progress or update about the ticket resolution. Furthermore, the issues in free support model are resolved on a first come first serve basis and we will let you know once the ticket is resolved. Please spare us some time.
We are sorry for the inconvenience.
Just wondering, how many issues need to be resolved before you get to this one?
Thanks
@conner.phillis
Since, we offer free support as well, a lot of issues and feature requests are received in this support forum on daily basis and we log them in our issue tracking system. But these tickets posses lowest priority because of the policy of free support mode. Furthermore, the resolution time of an issue logged in free support depends upon number of issues logged prior to it, nature and complexity of the issue, number of API components responsible for the issue, etc.
On the other hand, we do offer priority support as well that is paid service and we recommend posting/reporting showstopper and blocker issues there because they have highest priority and are resolved on urgent basis.
Concerning to the ticket which is logged for your issue, it has just been logged and it is pending for an initial investigation. We will surely check it as per our schedule and policy and as soon as it is resolved or we have any updates regarding its fix, we will update you in this forum thread. We highly appreciate your patience and comprehension in this regard.
We apologize for the inconvenience.