Can't read selected value from XFA combobox

Hi!

I’m using Aspose PDF .NET v20.8.0 and I have a PDF file which has a selected combobox value in the form when I open it in the reader. I’m able to read text field’s content. I’m also able to read the combobox options but not the combobox selected value. I can see the value name in the list but …XFA[name] is empty.

What am I doing wrong?

BTW, I think it’s the same with checkboxes.

Regards,
Holger

@hharcworx

Could you please share the sample PDF along with code snippet which you are using to read the value. We will test the scenario in our environment and address it accordingly.

Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense(@“c:\temp\Aspose.Pdf.lic”);

        Document pdfDocument = new Document(@"c:\temp\9605900-10-Servicereportletter - Application.pdf");
        //foreach (Field formField in pdfDocument.Form)
        //{
        //    Console.WriteLine("Field Name : {0} ", formField.PartialName);
        //    Console.WriteLine("Value : {0} ", formField.Value);
        //}

        string[] names = pdfDocument.Form.XFA.FieldNames;

        Console.WriteLine($"{pdfDocument.Form.XFA["data[0].Main[0].Travel-Section[0].Subform1[0].Application[0]"]}");

9605900-10-Servicereportletter - Application.pdf (170.1 KB)

@hharcworx

We were able to notice the same issue in our evironment and logged it as PDFNET-48662 in our issue tracking system. We will further look into its details and keep you informed with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.