0
votes

I used itext5 and to fill in the values of a combo (Acroform) I used this code:

 formfields.SetListOption(combo, values, descriptions);

Now with Itext7 I'm a little bit lost, I have this: (formfields is an PdfAcroForm)

 formfields.GetField(combo)

but I can't found how to fill the combo values.

Any clues?, Thank you

1

1 Answers

1
votes

Ok, I found a way to do it:

List<string> iValues = new List<string>();
// fill iValues 
PdfArray valuesArray = new PdfArray(iValores,true);
formfields.GetField(combo).SetOptions(valuesArray);

and it works.