Skip to main content
Known Participant
August 26, 2020
Answered

How I can access the IMAGE FROM THE FDF

  • August 26, 2020
  • 2 replies
  • 1498 views

Hello All,

 

I'm trying to save the PDF using FDF. It's working. When I have added the image field on the pdf and try to access it, I can get all the field except images field and Image. I would like to exract the image on the pdf. Is there any way we can extarct it.

 

I'm able to get the images when I'm saving the PDF in my local machine then I can get the images.

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

... and one more thing: Don't expect to receive the image as a plain image file - what you will find in the FDF is the PDF data structure that contains data about the image (e.g. size, color space, the compression filter used, and the raw image data). You will then have to make sense of that and create a file that you can use. You will need to consult the PDF specification about how to interpret what you find in the FDF file. 

2 replies

Bernd Alheit
Community Expert
Community Expert
August 26, 2020

One example:

Submit selected form fields to a server-side script as FDF.
var aSubmitFields = new Array( "name", "id", "score" );
this.submitForm({
cURL: "http://www.example.com/cgi-bin/myscript.cgi#FDF",
aFields: aSubmitFields,
cSubmitAs: "FDF" // the default, not needed here
});

Bernd Alheit
Community Expert
Community Expert
August 26, 2020
Known Participant
August 26, 2020

I have tried the below method to call, but it's not working

var aSubmitFields = new Array("Image2_af_image");

this.submitForm({
cURL: "http://localhost",
aFields: aSubmitFields,
cSubmitAs: "FDF" // the default, not needed here
});

 

Is this is the way to send Image fields 

Karl Heinz  Kremer
Community Expert
Community Expert
August 26, 2020

Yes, that is what you need to do. However, your submit URL needs to be able to receive an uploaded FDF file. You are just pointing at "http://localhost" - you need to either redirect that to something that can process an upload, or use a different URL (e.g. http://localhost/upload.php). Do you have a script or a program on the server that can deal with an submitted FDF?