3
votes

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 UPDATE END

i am using Acrobat XI Pro trial version

Adobe Acrobat offer forms in pdf documents, those forms can be submitted to server

submit button settings http://gyazo.com/0ff0dc17210f39f062a131c85265406c

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();

?>

and i am getting FDF data instead, not PDF document

1
What is the exact filename u getting and its mime type ?frunkad
FDF is one of the format pdf forms can export(includes form name and values only). data i am getting: <pre>%FDF-1.2 1 0 obj <</FDF<</F<</Type/Filespec/F.... </pre>Dmitry Borisov
Darshan Jain i am getting data stream.Dmitry Borisov
Can you share the PDF in question?mkl
@mkl i give me a hint! i discovered it sends PDF if opened by adobe reader at my computer, but same pdf form sends FDF if opened in Chrome browser from webserverDmitry Borisov

1 Answers

0
votes

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