Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Submit image to PHP script

New Here ,
Apr 25, 2018 Apr 25, 2018

Hello

I would like to know how to get an image uploaded to a PDF Form and then submit it to a PHP Script.

So far I've been able to get the text fields, checkboxes, radio buttons and also lists, but the image is not sent from Adobe.

  $name=$_POST['Name'];

  $surname=$_POST['Surname'];

  $gender=$_POST['Gender'];

  $image=$_POST['Image'];

That's my PHP script and it gets all text but not the image, it says Undefined Index (Not sent).

Is there a way to send the file with a Javascript script or something I have to set up in Adobe?

I'm using this script to send the form via a button:

this.submitForm({

cURL: "myscript.php#HTML",

cSubmitAs: "HTML",

          cCharset: "utf-8"

});

TOPICS
PDF forms
759
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Apr 25, 2018 Apr 25, 2018

No, if you want submit an image from a PDF, then that image needs to be on a button field, and it has to be submitted as FDF.  Take a look at the FDF toolkit:

Acrobat Forms Data Format (FDF) Toolkit

If you want to load an image into a PDF from an HTTP response, then it also has to be received as FDF. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 25, 2018 Apr 25, 2018

No, if you want submit an image from a PDF, then that image needs to be on a button field, and it has to be submitted as FDF.  Take a look at the FDF toolkit:

Acrobat Forms Data Format (FDF) Toolkit

If you want to load an image into a PDF from an HTTP response, then it also has to be received as FDF. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2018 Apr 26, 2018
LATEST

Thank you for your response, it only works indeed with FDF.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines