Unable to check checkbox in PDF XFA Document so that is readable in Acrobat Reader

Hey,

I am trying to fill out a PDF XFA document which works well for the most part. I seem to be unable to check a couple of specific check boxes however. When I check them the check marks are visible when the document is viewed inside the chrome browser but hidden when viewed in Adobe Acrobat Reader DC (version 2018.009.2005). 

I will attach a Visual Studio 2017 sample project to illustrate the issue. I am attempting to fill out a form titled "VBA-21-526EZ-ARE" and would like to check  the checkbox in field 20A as "Yes". I seem to be unable to do so when treating the form as a PDF XFA form but I can check it when the form is saved as an acroform. However, saving the form as an acroform is not an option because it disables/removes any field filling logic for many PDF viewers/editors. Please note that is possible to see the check mark when viewing the form inline in Google Chrome form example. It is not possible to see it in Adobe Acrobat Reader.

Interestingly, when I check the field as "No" it seems to work fine anywhere.

The following logic is used to set the checkbox:

using (var stream = System.IO.File.Open(fileDirectory, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                var doc = new PdfLoadedXfaDocument(stream);
                PdfLoadedXfaForm loadedForm = doc.XfaForm;

                //Get the loaded check box field.
                PdfLoadedXfaCheckBoxField loadedCheckBox20AYes = (loadedForm.Fields["Page_10[0]"] as PdfLoadedXfaForm).Fields["YesNo3[1]"] as PdfLoadedXfaCheckBoxField;
                PdfLoadedXfaCheckBoxField loadedCheckBox20ANo = (loadedForm.Fields["Page_10[0]"] as PdfLoadedXfaForm).Fields["YesNo3[0]"] as PdfLoadedXfaCheckBoxField;

                loadedCheckBox20AYes.IsChecked = true;
                loadedCheckBox20ANo.IsChecked = false;

                var result = new MemoryStream();
                doc.Save(result);

                result.Seek(0, SeekOrigin.Begin);

                return new FileStreamResult(result, "application/pdf");
            }

Can you please advise on how to make this work in Adobe Acrobat Reader. Like I said - saving as an acroform is not an option (though I did include a sample of that process in the project as well). Clicking the first link titled "Fill and Download PdfLoadedXfaDocument" should produce the desired outcome.

Please note that the PDF form can be found in the following directory in my sample: FillPDFExample\App_Data\VBA-21-526EZ-ARE.pdf

Thanks in advance!

Attachment: CheckboxPDFExample_844f6694.zip

1 Reply

CM Chinnu Muniyappan Syncfusion Team January 25, 2018 11:55 AM UTC

Hi Martin, 
 
Thank you for contacting Syncfusion support. 
 
We are able to reproduce the reported issue in our side and it occurs while filling the same name check box fields. We consider this to be an issue and the fix will be available in our upcoming volume 1 release which will be available in mid of February 2018. 
 
Regards, 
Chinnu

Loader.
Up arrow icon