Skip to main content
Participating Frequently
August 4, 2025
Question

Cannot process content of type text/html" – despite correct XML response from PHP

  • August 4, 2025
  • 1 reply
  • 289 views

Hello,

I have a PDF form created with AEM Forms (Designer) that submits data using a button configured as:

- Submit to URL: https://mydomain.com/submit_form.php
- Submit As: XML Data (XML)
- Encoding: UTF-8

Until recently, the form was working fine on all machines. Now, on all machines, I receive the following error:

> An error occurred during the submit process. Cannot process content of type text/html

However:
- The data **is successfully saved** to the MySQL database via PHP
- The response from the PHP server is properly formatted as XML

I narrowed the testing to this example `xml_response.php`, which i accesed via Submit button in Adobe form and directly from Chrome:

<?php
while (ob_get_level()) ob_end_clean();
header("Content-Type: text/xml; charset=UTF-8");
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<response><status>success</status></response>';
exit;

 

When I run this file in Chrome or via curl, the response is:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8

<?xml version="1.0" encoding="UTF-8"?><response><status>success</status></response>

 

When i access it via Submit button from Adobe Reader i get the same error... 

What I've tried:

  • Ensured no BOM in PHP file (checked with hex editor)

  • Removed all whitespace before <?php

  • Set default_charset = "" in php.ini

  • zlib.output_compression = Off

  • Cleared Adobe Reader temp/cache

  • No recent changes in Apache/PHP on server

Questions:

  • Why does Acrobat still throw this error despite receiving valid XML?

  • Could some system-level security tool (Windows Defender?) interfere with MIME detection?

Any help or similar experiences would be appreciated.

Thank you!

1 reply

MikelKlink
Participating Frequently
August 4, 2025

Have you checked whether, when run in Acrobat, also that XML response is returned? You could check using wireshark or some similar tcp sniffer.