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

saving over http with php

michalhughes
Registered: Apr 18 2007
Posts: 4

With Acrobat 8 (pro) is it possible to use the submit button on the pdf form, and then get the whole pdf sent to a php script, which in turn saves that form filled out pdf to the server with the changes? This seems like it should be easy, but I cannot do this yet. The goal is to save an updated pdf after the submit button is pushed, over http.

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, it is easy, But to submit a whole PDF from Acrobat Reader you'll need to enable it for FillnSave. Look on the Advanced menu for "Enable Usage Rights in Adobe Reader". You should not be having any problems from Acrobat Pro.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

jasondeegan
Registered: Feb 5 2008
Posts: 21
thomp - do you have a sample script (ASP, PHP JSP) that you can show us? I've seen a reference to a gdform.asp page but can't find it.

So far I'm able to see POST data on my server, but when I send as PDF or XML, I get nothin'.

Thanks for your help in advance.

Jason
jasondeegan
Registered: Feb 5 2008
Posts: 21
For PHP here's a solution:

And the answer is in the HTTP_RAW_POST_DATA:

$fp = fopen( 'pdf/jason.pdf', 'wb' );
fwrite( $fp, $GLOBALS[ 'HTTP_RAW_POST_DATA' ] );
fclose( $fp );