Skip to main content
Known Participant
August 9, 2017
Answered

how to insert multiple image in pdf form + drag and drop image to pdf form

  • August 9, 2017
  • 1 reply
  • 12167 views

is there a way I can create a pdf form that will enable user to insert multiple image at once in a pdf form? does Image Field has this option?

is drag and drop also allowed in a pdf form?

thanks

This topic has been closed for replies.
Correct answer try67

Let's say you have 10 button fields called "Image1", "Image2", etc., and you want to prompt the user to insert an image field into all of them, one after the other. You can use this code to do it (remove the alert window if you don't want it to appear before each file selection):

for (var i=1; i<=10; i++) {

    app.alert("Select the image for field #"+i+":",3);

    this.getField("Image"+i).buttonImportIcon();

}

1 reply

try67
Community Expert
Community Expert
August 9, 2017

You can use a script to prompt the user to insert images into multiple fields at once, but they will need to select the image for each field. If you want the images to be identical just give all the fields the same name.

Drag-and-drop is not possible, though.

iammundAuthor
Known Participant
August 9, 2017

My Client needs to be able to insert and select multiple photos, instead of inserting one photo at a time. let's say he needs to insert more than 10 image to the pdf form. it's not possible right? if yes, any suggestion though that I can also suggest to him.

thanks

try67
Community Expert
Community Expert
August 10, 2017

hi again, added question:

I have 10 image fields and I used the script and it did work, however, if I only have 5 image to be added to the form, how can I stop the pop-up message from appearing continously even though I clicked the Cancel button on the Image Field?

Also, is there a way the script can detect if the Image Field is empty or not?

Thanks


Yes, both things are possible. How do you want to use the latter, though?