Itext 7.net:填充PdfChoiceFormField

Itext 7.net:填充PdfChoiceFormField,itext,itext7,Itext,Itext7,我使用了itext5,为了填充组合(Acroform)的值,我使用了以下代码: formfields.SetListOption(combo, values, descriptions); 现在有了Itext7,我有点迷路了,我有了这个:(formfields是一个PdfAcroForm) 但是我找不到如何填充组合值 有什么线索吗?谢谢好的,我找到了一个方法: List<string> iValues = new List<string>(); // fill iVa

我使用了itext5,为了填充组合(Acroform)的值,我使用了以下代码:

 formfields.SetListOption(combo, values, descriptions);
现在有了Itext7,我有点迷路了,我有了这个:(formfields是一个PdfAcroForm)

但是我找不到如何填充组合值


有什么线索吗?谢谢

好的,我找到了一个方法:

List<string> iValues = new List<string>();
// fill iValues 
PdfArray valuesArray = new PdfArray(iValores,true);
formfields.GetField(combo).SetOptions(valuesArray);
List-iValues=新列表();
//填补空缺
PdfArray值array=新的PdfArray(iValores,true);
formfields.GetField(组合).SetOptions(valuesArray);
它是有效的

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