The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
private PDFDocument _document; _document = new PDFDocument("Something.pdf"); foreach (IPDFField field in _document.Form.Fields) { _PDFControls.Add(field.Name); if(((IPDFLoadedField)_document.Form.Fields[field.Name]).Type == PDFFieldTypeEnum.Signature) _PDFSignableControls.Add(field.Name); }
When I pause the debugger at the if statement, I get no problem seeing what is in _document.Form.Fields[0]... The fields name is "SignatureFieldEmployee[0]"... but when I try to find out what _document.Form.Fields["SignatureFieldEmployee[0]"] I get the following error:
"Index was out of range. Must be a non-negative and less than the size of the colleciton. Parameter name: index"
Why can i find the field by using and integral indexer, but not the name of the field? I have been using the name of the field 5-10 times in other places in my code...
DKDhivya K Syncfusion Team January 10, 2007 01:22 PM UTC
Hi Miles,
I agree that when you can get/set values for the field index, it should be possible to read values from the field names too. I tried testing this issue with the files that you have provided me in Direct trac and was not able to reproduce the issue with those files. I did the following: 1. Fixed a break point at the "if" statement 2. Added watch and found the properties of the signature field both with its index and with its name. Both displays the properties. Could you please let me know if I have done something wrong or provide me a sample to reproduce the issue? So that I can investigate further on this issue.