Skip navigation
Currently Being Moderated

Submit complete PDF to server.

Jul 18, 2012 7:42 PM

Tags: #submit #submit_form #submit_complete_pdf

So I started out thinking this would be a super easy thing to implement. I had an awesome PDF that I wanted to put on-line and have people fill out and hit a button and have it saved on my server. (eventually I'd love it if it was submitted to my dropbox.) Looking high and low I couldn't find anyway to do this. I even spent an hour on chat with adobe and had a case subsequently submitted and then escalated to senior support and after 2+ hours on the phone they still don't know what to say.  For the submit form options the bottom one is submit the complete PDF and when I choose that nothing gets saved to the server instead a PDF gets created showing an index of the directory that I'm trying to save it to. Finally I decided that maybe I would just have the data submitted as fdf and then put into the PDF and re saved. So after finding this link< http://koivi.com/fill-pdf-form-fields/tutorial.php > I can now have the filled out information submitted as a fdf file! But can't figure out how to have the fdf put back into the PDF and flattened and saved.

 

So in short I'm looking to have a PDF filled out and submitted/saved back on the server. Either by submitting the complete PDF or submitting the fdf file and put back into the PDF. 

 

If anyone can help me with this I'd be eternally greatful to you!!!

 
Replies
  • George Johnson
    9,232 posts
    Aug 11, 2002
    Currently Being Moderated
    Jul 18, 2012 9:46 PM   in reply to chad Snelson

    In either case you will need to have a program on the server whose job is to process the submission, so something with the PDF or FDF, and return a response. In the cse of the complete PDF, this program (Perl script, PHP, ASP, Cold Fusion script, etc.) would take the entire contents of what is submitted and save it to a file on the server. The point is is doesn't happen automatically. When you set up the Submit Form action, you specify the URL of the server-side program that does the processing.

     

    In the case of FDF, the server could get it and merge it with a PDF, but this is normally done with a server-side component such as Appligent's FDF Merge or some component of Adobe's LiveCycle offerings.

     

    Finally, the server has to return a response that can be understood by the client. In the case of a submission from Acrobat/Reader, this can be FDF, which can provide some user feedback, redirect to a static or dynamically generated HTML page, or an empty response.

     

    This all means that you or someone else needs to do some programming. It not necessarily all that complicated, but it helps a lot to have some expertise in this area.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 3:28 AM   in reply to chad Snelson

    The submission arrives on the server as the input stream, so in PHP you can simply read it and write it back to a file.

     

    See the example in http://tv.adobe.com/watch/acrobat-community-tv/working-with-form-data/

     

    PHP used to include support for FDF parsing, but it's been depreciated. You can still get the libraries though, and put the classes back (along with a copy of the FDF Toolkit binaries) - see http://php.net/manual/en/book.fdf.php - but if you send XFDF data you can parse it easily as it's just XML.

     

     

    Also, bear in mind that recent security changes in Acrobat and Adobe Reader mean that if you're viewing the PDF on the desktop, FDF responses from the server will be blocked if they try to change the document or execute a script (such as filling in a form value or opening an alert box). If the PDF is running in a browser and the submission is to the same domain as the PDF was served from, the response will be allowed to run.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 25, 2012 3:39 PM   in reply to chad Snelson

    Are you set up to install PHP scripts on the server? Have you done some basic studying of PHP?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 25, 2012 5:20 PM   in reply to chad Snelson

    So, you were able to complete the steps in section 3 "Add your data-processing PHP script to handle the posted data" and have it work? At least, the one line script, and see the results?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2012 12:16 AM   in reply to chad Snelson

    Ok, when you typed in that PHP it was stored on your web server (I assume it was, since that's where it will need to be to make it work for anyone but you). So that's what I meant by "install PHP scripts on the server".

     

    Before talking any more about how to get the full PDF, I think it's worth talking more about the FDF. FDF files are actually more useful than you perhaps realise. When you have collected a lot of them, they are a whole lot easier to work with and analyse than the filled in PDF. It can save you a bunch of money in some cases too.

     

    What is your objection to FDF files? What is that you (believe that) you can't do with them that you can do with a filled PDF?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points