Setting of choice form field using setValue Method
New for iText Core 7.1.11 was a change to how form fields are handled, specifically when the /TI value is present, and when using SetValue for a choice form field.
Details
Prior to version 7.1.11, calling a
setValuemethod on the choice field set the value incorrectly. It does not modify theIdictionary of the field.For the choice field, the
Idictionary exists but is not filled in, resulting in incorrect setting.After the fix, you will notice that the values are properly set for the choice field.
Below is some sample code to test the issue with iText Core 7.1.11 and compare with previous versions:
##GITHUB:https://github.com/RagvendraSingh/releaseexample/blob/master/ChoiceFieldExample.java##
##GITHUB:https://github.com/RagvendraSingh/releaseexample/blob/master/ChoiceFieldExample.cs##
Resources
choiceFieldsWithUnnecessaryIEntries.pdf