I can't get the options of CoboBoxField from a XFA form

I am reading the xfa form from multiple pdfs but the comboboxfields do not return the option lists.

This is how I try to get the options but return a List empty

     List<string> fields = new List<string>((field as PdfLoadedXfaComboBoxField).Items);


6 Replies

RB Ravikumar Baladhandapani Syncfusion Team November 10, 2023 11:59 AM UTC

We tried to replicate the reported behavior with provided details on our end, but we are unable to reproduce this issue with our test documents. We suspect the reported issue occurs with a specific document. Could you please share the input pdf file or simple sample to reproduce the issue, it will be helpful for our further investigation.



NB Nicolas Baigorria November 10, 2023 01:37 PM UTC

Sure, this is the file:

https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/imm5257e.pdf

Since I do not have access to the options, I cannot select a value for the combobox fields without breaking the certificate, which is my main objective. I can export the form as an xml and thus obtain the list of options but I still cannot populate the combobox field



RB Ravikumar Baladhandapani Syncfusion Team November 14, 2023 11:00 AM UTC

We are currently analyzing the reported behavior with the provided details on our end, and we will provide further details on November 15th, 2023.



RB Ravikumar Baladhandapani Syncfusion Team November 16, 2023 06:28 AM UTC

Upon further analysis, we found that the reported document contains XFA fields. And the combo box fields items are added using the java scripts. As of now, we don't have support to retrieve the combo box values using JavaScript. So we could not proceed further on this.



NB Nicolas Baigorria November 17, 2023 06:23 PM UTC

So, is it possible to get the corresponding values ​​and fill the field without manually adding values ​​and breaking the certificate?



KS Karmegam Seerangan Syncfusion Team November 20, 2023 03:05 PM UTC

Hello Nicolas,


As mentioned before, the values in the combo box are created through JavaScript during runtime. Unfortunately, we do not have the capability to interpret or fill the field in XFA by parsing JavaScript. Additionally, there are no plans to support this due to the deprecation of XFA in PDF 2.0. So we could not proceed further on this requirement.


Regards,

Karmegam


Loader.
Up arrow icon