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
|