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

Submit form and export as PDF

kfigueroa
Registered: Nov 11 2008
Posts: 16
Answered

I've created a form using Acrobat 9 Pro. My submit button is set to go to a php script and the export option I chose is to export the full PDF. Basically, what I want to do is put it on my website and have users fill out the form, then when submitted save that copy of the file as a new file for that user id.

However, when the php script is not receiving the file. I'm doing a print_r on $_POST, $_FILES, and $_REQUEST and it's not coming back with anything.

What am I doing wrong?

My Product Information:
Acrobat Pro 9.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You wouldn't use any of those global variables. Try $HTTP_RAW_POST_DATA.

George
kfigueroa
Registered: Nov 11 2008
Posts: 16
Thanks - I see that I'm getting data from $HTTP_RAW_POST_DATA, but how do I get the PDF file from that data?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The data should be the complete contents of the PDF file. Are you seeing something different?

George
kfigueroa
Registered: Nov 11 2008
Posts: 16
I'm seeing something that looks like this:

FDF-1.2 %���� 1 0 obj <<<><><><><><><><><><><><><><><><><><><>]/ID[<8DDBA869033706EC427D2C14A7AF1B97><8439E4352DCA414DA68B84D43361BC2E>]/UF(http://reports.calinspect.com/administrator/custom_forms/USLIApartments.pdf)>>/Type/Catalog>> endobj trailer <> %%EOF
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The PDF is submitting a data file, an FDF (Forms Data Format) file specifically, and not the entire PDF. What this means is that you have to modify your submit action so that the entire PDF is what gets submitted.

George
kfigueroa
Registered: Nov 11 2008
Posts: 16
I changed it and am now getting something like this:

%PDF-1.6 %���� 1888 0 obj <>stream xڔZێ7��#Rw ������}��A��'�L���s��jw:�Ѱ�j/�R��R�!� QC� �Րs��1dL�ZB�AJ!7�%�܃Ԉ����q�P$HK-�i]H�k �z��@��Q���S:F)�(�Tr U0v�֠��;al#�4aqX����4c�r�o�+�[!�@/�j��y��5�m�נ�A^��yza��� o@o����P����)�?l1 �t�%=����3F聈���W���F��=� =�2���yz�U�&M���$���E���À�� � �!o��f%J�1��n�|�8�q�8 a^\�y��i!'� ����r�@�wP��&S ֑  �`�Bϩ >��^a$Qho\��y"oA{�?(�HHɣ��];.��(\Lh`�"�.�� ����q I��M���ӷ႕Đ\���84J�=$� $.....How can I use the file through this data like I would $_FILES?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
That's what you want to be getting. You just have to save all of that to a file.

George
kfigueroa
Registered: Nov 11 2008
Posts: 16
Thank you! It works perfectly. :)