These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Acrobat Form Submission Handling

nixopax
Registered: Feb 6 2009
Posts: 105

Forms submitted in Acrobat can be in several forms. FDF, XFDF(as well as XDP, XFA, XML), HTML(URL-encoded), and PDF.

I've been able to submit HTML to a server without issue. Server side technology recognizes it instantly. The other formats I've not had success with yet. How do servers treat the other formats? I primarily use PHP for my server side technology, and when I check every type of possible predefined variable i.e.: $_GET, $_POST, $_FILES, $_REQUEST, file_get_contents("php://input"), the only thing I ever get back is when I use: file_get_contents("php://input") for XFDF/XML. The XML submitted will be read, but stripped of their tags, and their raw data dumped into a single string. Not what I was expecting.

Interestingly, the $_SERVER variables when I dump them reveal some information that is new to me. The HTTP_ACCEPT shows that when sent as XFDF will accept: "application/vnd.fdf, application/vnd.adobe.xfdf, application/vnd.adobe.xdp+xml, text/html, text/plain, image/gif, image/jpeg, image/png, image/x-png, application/pdf" So when submitting from Acrobat Pro Extended it will accept any of these as a valid response back?

So, thinking of workarounds, I used this.exportAsXFDF() to populate a form field with all the other form fields and then submit as HTML to decode using header ("content-type: text/xml") and htmlspecialchars_decode() on the URL encoded variable. That worked, but I'm not interested in displaying XML. I'm sure there are PHP functions that could parse the string, but there would be serious performance issues if I had to submit POST data, decode it, and then parse it. Not to mention that the post_max_size in the php.ini dictates the max size of post data.

So the question would be, regardless of the server side technology, and regardless of the server type I submit to (IIS, Apache, Tomcat, etc...), how does Acrobat submit each type? Coming from an HTML forms background, I tend to treat a form as if it is by default set with an enctype="application/x-www-form-urlencoded". Does Acrobat have a specification like the W3C that I can refer to?

My Product Information:
Acrobat Pro Extended 9.0, Windows
nixopax
Registered: Feb 6 2009
Posts: 105
*Bump*