What I am trying to do is change SelectedItems in an Aspose.Pdf.InteractiveFeatures.Forms.ListBoxField. Lets say we have a ListBoxField listbox whose options are ‘a’ ,‘b’, ‘c’ and ‘d’. And I want to change the SelectedItems of this listbox to be ‘b’ and ‘d’ . Is there a convenient way to do this(or a function that can do this line SetListSelecdtion in iText) ? It would be better if I can see some snippets on this. Thanks.
In order to accomplish your requirement, you need to specify the item or index of items to be selected using Selected property of ListBoxField class. Please take a look over following code snippet.
In case you encounter any issue, please share the resource PDF so that we can test the scenario in our environment.
[C#]
var pdfDoc = newDocument(@“C:\pdftest\sample.pdf”);<o:p></o:p>