Failed to fill ComboBox form filed

Hi there,

As per the Aspose reference [API document here](http://www.aspose.com/docs/display/pdfnet/FillField+Overload_3), I tried to fill the items to simple combobox in one my form and got “Object Reference not found…” error. Here is the code I have used to do this:

string asposeOutput = @“D:\AsposeOutput.pdf”;
Aspose.Pdf.Facades.Form fm = new Form(@“D:\JobReq_withoutHiddenDropdown.pdf”, asposeOutput);
string positionType = “form1[0].P1[0].Request[0].Section1[0].PositionType[0]”;
fm.FillField(positionType, new String[] { “Three”, “One” }); //Got error here
fm.Save();

And also I am attaching my source pdf file.

My I know how to fix this or any workaround solution to fix? We are using similar kind of ComboBox filed in PDF form. Please let me know the solution for this.

Hi Srinu,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
PDFNEWNET-34300. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We
apologize for your inconvenience.

PS, As per my current observations, the code is unable to find the field in input document.

Hi,

Thanks for your response. It seems the the field is available in input document from this property:

fm.FieldNames;

Do I need to make any changes to PDF document while adding ComboBox? We need this feature to be working as the Aspose component is throwing this error in all of my pdf forms. Can you suggest something else to make it working?

Hi Srinu,


Yes you are correct. The field is available in PDF form but the name which you are using in the code snippet to reference the form field, is it same which you have used when ComboBox was added ?

Nevertheless, the development team is investigating this issue and trying to figure out the reasons of this problem. As soon as we have made some progress, we would be more than happy to update you with the status of correction. We are sorry for this inconvenience. We are sorry for your inconvenience.

Hi Nayyer,

Yes, it is with the same name in LiveCycle when I am adding ComboBox.

Hi Nayyer,

I am testing out this feature much more to make it work, but it was failing to me even for the simple example also. I have attached my very very simple document with only one combobox field and trying to fill out with values. In this case I am not getting any error but the output document is not having added combobox values.

fm.FillField(“form1[0].Numbers[0]”, new String[] { “Three”, “One” });


Hi Srinu,


I am testing this scenario and will get back to you soon. Sorry for the delay and inconvenience.

Hi Nayyer,

Thanks for your response. I am the developer of Highbeam systems (<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><span style=“font-size:12.0pt;font-family:“Times New Roman”,“serif”;
mso-fareast-font-family:“Times New Roman”;color:black;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>jrussell) and eagerly waiting for your response. I will follow up this thread for your msgs.

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>

Hi Srinu,


I have tested the scenario and have noticed the same problem. I have also attached the Numbers.pdf document with earlier logged issue and we will definitely consider resolving the issues related to this document. Please be patient and spare us little time. We are sorry for this inconvenience.

Hi Nayyer,

Thanks for your response. May I know when the next version of PDF component is coming out and are you considering these issues for the next version? if not, can you check with your developer what to make in Livecycle Designer for the correction of dropdowns?

Hi Srinu,


We currently busy in testing the upcoming release version of Aspose.Pdf for .NET 7.4.0 and as we just have noticed this issue, I am afraid the hotfix for this issue might not be included in this release. Nevertheless, I have requested the development team to investigate this issue in details and share the possible ETA. Please be patient and spare us little time.

Soon you will be updated with the required information. We are sorry for this delay and inconvenience.

Hi Srinu,


Thanks for your patience.

We have further investigated the above stated issue and have found that list of “PositionType” field does not have any item. That’s why customer code does not work; also please note that method with array parameter fm.FillField(“form1[0].Numbers[0]”, new String[] { “Three”, “One” }); is applicable only for multiselection list.

We are sorry for your inconvenience.