Is it possible to send a pdf of a form to a mySQL database?

  • jalleyne
    Asked on July 31, 2015 at 11:11 AM

    Hello, 

    I'm trying to make a user portal in which the users can access certain forms from my database based on some permissions. I'm able to get all of the form data I need into the database via $_POST data just fine, but I was wondering if there is a way to send a pdf version of the form into the database as a blob so I can pull it out of the database later. I noticed you have a field {pdf link} available when creating the autoresponder and notifier emails, but the {pdf link} is no where to be found in the form source code. Is there a way I can access it? 

     

    Thanks

  • Charlie
    Replied on July 31, 2015 at 1:12 PM

    Have you tried using the {pdf-link} tag instead when sending it in the PHP script?

    It should still be possible, I tried it using this link in my custom "Thank You" URL:

    http://www.example.com/?pdf={pdf-link} 

     

    I get the link that will generate the PDF submission, but not the PDF itself.

    Let us know if that will work.

  • jalleyne
    Replied on July 31, 2015 at 3:26 PM

    Sorry, I'm not sure if I get what you mean. Do you mean I should change the link to the custom "Thank You" page to include the '?pdf={pdf-link}' ? The link you posted gives me an information page about example.com.

  • Mike
    Replied on July 31, 2015 at 5:19 PM

    The PDF link has the following format:

    http://www.jotform.com/pdf-submission/{id}

    Where {id} is a submission ID, so you can get the ID with "$_POST['submission_id'];" in PHP and use it to construct a valid PDF link. I hope it helps.

  • jalleyne
    Replied on August 4, 2015 at 3:03 PM

    Thank you! This helps me a lot.

    Do you know if there is a link that opens a pdf in a browser window rather than downloading directly? If not, thats fine, I'm just curious. 

     

  • Mike
    Replied on August 4, 2015 at 3:16 PM

    You are welcome.

    It is most likely that we do not provide the view link, but you can try with some remote viewer. For example with a Google Docs Viewer:

    https://docs.google.com/gview?url=pdf_link_here

    https://docs.google.com/gview?url=http://www.jotform.com/pdf-submission/314524704674845057&embedded=true

    https://docs.google.com/gview?url=http://www.jotform.com/pdf-submission/314524704674845057