Is it possible to create a form where users can upload photos into the form?

Using adobe acrobat XI Pro


Mitchel Ingram


2 Answers

Voted Best Answer

If you have Adobe Acrobat XI you can create a Button form field, with a one line script, which will allow the user to import an icon, since the user has Adobe Acrobat or Adobe Reader version XI (if the user has Adobe Reader XI, the logo must be in PDF).

To do this, follow these steps:

  1. Go to menu View -> Tools -> Forms and click on Edit
  2. Create a Button
  3. Double click the button to enter into the button's properties
  4. Click on the Options tab and under Layout choose 'Icon Only'
  5. Click on the Actions tab and add a "Run a JavaScript" action to the "Mouse Up" event with the following script (copy & paste in the window):

    event.target.buttonImportIcon();

  6. Click ok and close.

  7. Right-click the button and choose “Duplicate Across Pages…” so you can copy the button to the others pages in one step.
  8. Close Form Editing and test it

enter image description here

The other option is to use LiveCycle Designer to create a PDF form. LiveCycle Designer allows you to create an Image Field that lets end-users upload photos or graphics:

enter image description here


By Almir R V Santos   

Besides the solution provided by George, which is a good one, you can use an alternative one, in which you can place the following JavaScript in the "Mouse-up" event of the Clear button. This script removes and recreates the image field, supposing its name is unique.

var fieldName = "imageField"; //change "imageField" name for the real one
var f = this.getField(fieldName);
var p = f.page;
var r = f.rect;
var bs = f.borderStyle;
var sc = f.strokeColor;

if (typeof f.page == "number") {
    this.removeField(fieldName);
    var f = this.addField(fieldName, "button", p, r);
    f.setAction("MouseUp", "event.target.buttonImportIcon();");
    f.buttonPosition = position.iconOnly;
    f.buttonFitBounds = true;
    f.borderStyle = bs; 
    f.strokeColor = sc; 
}
else {
    app.alert("There is more than one field called \"" + fieldName + "\".");
}


Almir R V Santos   


Please specify a reason: