Post data using XFA Submit button in PDF in IE - submit button is not working in IE

I’ve been trying to submit a pdf form in IE with the below code. The form is not getting posted to the server side in IE but it does get posted in chrome. Any help is much appreciated.

Code:
FileStream fs = new FileStream(pdfoutPath, FileMode.Open, FileAccess.ReadWrite);
// Instantiate Document instance
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fs);
Aspose.Pdf.Facades.FormEditor fe = new Aspose.Pdf.Facades.FormEditor(pdfDocument);

            string submissionUrl = "http://localhost/app1/forms/test1";

            
                string label = "Submit";

                fe.SubmitFlag = Aspose.Pdf.Facades.SubmitFormFlag.Fdf;

                fe.AddSubmitBtn(string.Format("SUBMITFORM_{0}", 1), 1, label, submissionUrl,500, 765, 600, 790);


                fe.Save(fs);
                fs.Dispose();

Hi Priya,


Thanks for contacting support.

I have tested the scenario using following code snippet where PDF file with Submit button displays in web browser and when pressing the button in Chrome, it tries to post data to application but when using IE for debugging, the submit button does not seem to be working. However in order for us to be certain about this problem, can you please your sample application for receiving form data when Submit button is pressed. We are sorry for this inconvenience.

[C#]

FileStream fs = new
FileStream(“c:/pdftest/BLUE±+2015+W-2+Copy+D.pdf”,
FileMode.Open, FileAccess.ReadWrite);<o:p></o:p>

// Instantiate Document instance

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(fs);

Aspose.Pdf.Facades.FormEditor fe = new Aspose.Pdf.Facades.FormEditor(pdfDocument);

string submissionUrl = "http://localhost/app1/forms/test1";

string label = "Submit";

fe.SubmitFlag = Aspose.Pdf.Facades.SubmitFormFlag.Fdf;

fe.AddSubmitBtn(string.Format("SUBMITFORM_{0}", 1), 1, label, submissionUrl, 500, 765, 600, 790);

fe.Save(fs);

fs.Dispose();

MemoryStream stream = new MemoryStream();

// Save resulting PDF document.

pdfDocument.Save(stream);

Response.Clear();

Response.ClearHeaders();

Response.ClearContent();

Response.Buffer = true;

Response.Charset = "UTF-8";

Response.AddHeader("Accept-Header", stream.Length.ToString());

Response.AddHeader("Content-Length", stream.Length.ToString());

Response.AddHeader("Expires", "0″");

Response.AddHeader("Pragma", "cache");

Response.AddHeader("Cache-Control", "private");

Response.AddHeader("content-disposition", String.Format("inline;filename={0}", "article" + "docId"+ ".pdf"));

Response.ContentType = "application/pdf";

Response.AddHeader("Accept-Ranges", "bytes");

Response.BinaryWrite(stream.ToArray());

Response.Flush();

Response.End();

Right now I have only this code in the receiving end but later I have to parse the data and store it in a database.

StreamReader reader = new System.IO.StreamReader(Request.InputStream);

        String Data = reader.ReadToEnd();

Hi Priya,


Thanks for sharing the details.

I
have further tested the scenario and I am able to notice the same problem that Submit button becomes disabled when PDF file is rendered inside IE. However when same file is rendered in Chrome, the submit button works fine. For the sake
of correction, I have logged this problem as PDFNEWNET-40090 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.<o:p></o:p>

I also want to bring your attention that the submit button is working in Acro forms in IE.
The problem of submission not happening is only with XFA forms in IE.
Both acroforms and xfa forms submit works in Chrome.

Hi Priya,


Thanks for your feedback, we have recorded you findings. Our product team will consider this during the issue investigation. We will keep you updated about the issue resolution.

Thanks for your patience and cooperation.

Best Regards,