PDFsharp & MigraDoc Foundation

Combobox SelectedIndex is not working
Page 1 of 1

Author:  sagar.jumble [ Tue Dec 20, 2016 7:19 am ]
Post subject:  Combobox SelectedIndex is not working

I am trying to edit the a PDF But This has China as default value and when I try to set the selected index and save the file China is shown as value,
Also for a file if it doesn't have any default value it always shows empty value.
Below is my code

PdfDocument pd = PdfReader.Open(sourceFilePath, PdfDocumentOpenMode.Modify);

var pdfFields = pd.AcroForm.Fields;

((PdfComboBoxField)pdfFields[i]).SelectedIndex = 0;
//i is index generated when we iterate pdfFields.

Can anyone please try to edit some PDF using PDF sharp in Code and let me know what am I dping wrong.
I have generated editable PDF from http://www.pdfescape.com

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group