Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Problem With Setting/Getting Combobox Value Via FillField

$
0
0
I ran into some problems when I tried to set the value of a combobox using FillField method.
I need to be able to set the combobox value programmatically and retrieve that value later.

Eg: I have a combobox with items [{"Option 1", -1}, {"Option 2", 0}, {"Option 3", 1}].
If I call FillField("ComboboxName", "0"), it will select the second item in the list (as expected).
However when I try to access the pdf later and try to read the value of the combobox using GetField("ComboboxName"), it will return "Option 2" instead of 0. But, if I open up the pdf and manually selection "Option 1", save, then manually select "Option 2",  then save and run GetField, it will return 0 (expected value).

I believe the problem lies with FillField setting the wrong value. 
It'd be great if I can get some help with this.

I attached a sample .net 4 console application.
I used VisualStudio 2013 and Aspose PDF 9.6.0.0

Thanks!

Viewing all articles
Browse latest Browse all 3131

Trending Articles