-1

Thanks in advance!

I created a PDF Form using Adobe Acrobat and set the action button to submit the form to the URL of my server.

After fill out the form in the browser and hit submit, It sends a POST request to the URL but without any data

When I inspect the network, I find that there is a lot of binary data inside "Request Payload" where I can find information of the submitted form (Screenshot)

enter image description here

I can retrieve the "Payload Request" string using file_get_contents('php://input')

I wonder is this the correct way of doing it?

If it is, is there a standard way how I can parse the "Payload Request" string into form fields and values?

Thanks

Keo Strife
  • 1,416
  • 3
  • 15
  • 23

2 Answers2

0

Appears to be proprietary and you need: Acrobat Forms Data Format (FDF) Toolkit installed on the server.

Just for fun if you can't get that setup:

preg_match_all('#<</T\(([^\)]*)\)/V\(([^\)]*)\)#', $payload, $matches);
$DATA = array_combine($matches[1], $matches[2]);
print_r($DATA);

If you need the other data such as file name, etc. that would be more.

AbraCadaver
  • 78,200
  • 7
  • 66
  • 87
0

If you have access to the PDF form, you can switch the "Export Format" to HTML which will allow you to access data via the $_POST superglobal.

Jan Slabon
  • 4,736
  • 2
  • 14
  • 29