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);
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.
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
We are currently analyzing the reported behavior with the provided details on our end, and we will provide further details on November 15th, 2023.
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.
So, is it possible to get the corresponding values and fill the field without manually adding values and breaking the certificate?
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