phppdfacrobat

PDF form sends FDF instead of PDF


Update

I discovered it sends PDF if opened by adobe reader at my computer, but same PDF form sends FDF if opened in Chrome browser at website

Original Question

I am using Acrobat XI Pro trial version. Adobe Acrobat offer forms in PDF documents; those forms can be submitted to the server.

"Submit" button settings:

example

My server code:

<?php

ob_start();
$file = file_get_contents("php://input"); //Gets binary PDF Data
$time = microtime(true);
$newfile = "./customers/" . $time . ".pdf"; //Names file based on the time to the microsecond so nothing gets overwritten.
$worked = file_put_contents($newfile, $file); //Creates File
ob_end_clean();

?>

I am getting an FDF data instead, not a PDF document.


Solution

  • In general, Adobe PDF Forms full functionality available only in Adobe Reader. Google Chrome's PDF viewer sends only FDF format. Firefox's PDF viewer don't allow form editing/sending at all. Maybe obvious, but I am a PHP developer, and have never worked with PDF Forms.