Skip to main content
Inspiring
September 27, 2012
Answered

Acrobat form field that allows Reader user to browse and insert a picture into a predefined area

  • September 27, 2012
  • 9 replies
  • 81735 views

Is there a way to do insert a form field into an AcroForm that allow Reader users to browse and insert a picture into that form field?

I know that LiveCycle can do this, but I need to do this using an AcroForm. Or maybe there's a third-party plug-in that can be used in an AcroForm to do this?

This topic has been closed for replies.
Correct answer George_Johnson

No, you don't need Acrobat 11 to create a form that uses this method, but your Reader users will need to upgrade. I don't see that they've announce the release date for Reader yet, but in the past it has usually been within about a month of the announcement.

9 replies

Participant
November 11, 2016

for work I have to fill out a form that has a insert picture of the job completed.  when i click on the area it brings up the select icon window  i browse for my file.  it defaults to pdf. but i can change the file type, to jpg and then select my picture.

my question is  how do i make it default to jpg for the file type.  when i have to insert many many pictures every day it gets very old very fast.    i looked around in options.   if it's part of the form i can get the form modified.. but i would need to know exactly to what so i can pass that on to the IT dept. 

Inspiring
November 11, 2016

Check out this other thread where I posted a folder-level script that helps with this: event.target.buttonImportIcon();

August 24, 2016

Hi guys,

I have managed to do the event.target.buttonImportIcon(); procedure successfully, but I actually need two boxes for photo input on the same page. When I click on the second box and browse the photo I want, it changes the photo on the first box too!

Any smart to fix this?

Thanks

Inspiring
August 24, 2016

@leority - that's because the fields are named the same. In Acrobat, any field named the same will have the same data mapped to them.

Easy fix: When in Edit mode, double click one of the fields to bring up Properties. On General tab, type a different  Name in the field. Close edit mode. Test.

Note, the script is the same for both photo fields...just the names should be different.

Cheers!

August 25, 2016

Interestingly I didn't have the same names on both boxes. But I created 2 new boxes (beside each other) just for testing. Tested both and they accepted the 2 different pictures. Then I deleted the previous 2 non-working boxes and adjusted the dimensions of the just created ones to the right spots. Tested again and... didn't work! Exact same symptoms as the others.

I guess it has something to do with the settings I'm using to suit the form needs...

Participant
May 18, 2015

The Javascript Action button with:

event.target.buttonImportIcon();


works great but I need to have it also work when Extended Features in Adobe Reader (Advanced menu) has been activated.

I need to have this form function together with the load image icon option.

Can this be achieved somehow?

Inspiring
May 18, 2015

It will work with Reader even if the form is Reader-enabled, but it must be Reader 11 or later. As mentioned before, Reader can only import from PDFs, not image files directly.

gcrescoli
Participant
October 7, 2015

If a picture was imported by error with the "buttonImportIco" function,

is it also to remove it ?

Maybe with a reset function to remove all pictures from all buttons (like RESET FORM) ?

Thank you for your help

Participant
March 30, 2015

Oh sad, thanks for pointing that out to me.

Participant
October 1, 2014

Hello.

I have recently added a button like this and am ok having it upload a pdf file.  I created this form in Adobe Acrobat XI on a Mac and it works great when I use it in Reader XI. However, when I sent the PDF document to someone else (also on a Mac and also using the latest version of Reader (in fact the exact same version as me here), it won't work.  the mouse turns into a hand, and when the user clicks, the box area becomes shaded, but no pop-up box allowing them to browse for the file to upload. Computer has been rebooted. Any thoughts?

Inspiring
October 1, 2014

If they happened to open the form in Preview, it will have destroyed all of the JavaScript in the PDF, so it won't work when opened in Adobe Reader. It's also possible that JavaScript is not enabled in Reader.

Participant
October 2, 2014

That's exactly what happened !  Thanks so much

Known Participant
September 9, 2014

Did anyone already findd a way to place a jpg, or it continues to be only pdf?

Thanks,

James A Hiltz CET
Participating Frequently
September 9, 2014

Plob,

what are you needing to accomplish?

Known Participant
September 9, 2014

I Already manage to place a button to insert a logo in a form. But it only allows (with adobe reader) to insert a pdf image. Is there a way for the end user to insert a jpg image?

February 26, 2014

George,

Can you help me out with a script to clear the images imported using the:

// Mouse Up script for a button

event.target.buttonImportIcon();

method? I am trying to use a submit button in the form to e-mail the form when clicked and then clear the form for the next entry. I am using PDF expert on an iPad to fill in the form, but the script:

// Get a blank icon object from the hidden button
var oBlankIcon = getField("Blank reset").buttonGetIcon({nFace: 0});

// Clear the IMAGE button by setting its icon to the blank one
getField("Contactor Picture 2").buttonSetIcon({oIcon: oBlankIcon, nFace: 0});

doesnt seem to be supported by PDF expert. Is there another way to accomplish this?

Inspiring
February 27, 2014

zoatway,

I'll have to check the most recent version of PDF Expert, but I know it simply didn't work with previous versions. I told users to manually clear by having a blank image available, but this doens't help do it via a script.

Participant
June 20, 2013

Everyone - this is great. I have noticed that when you bring in the files into the PDF it retains all of the resolution of that file. I incorrectly assumed that the "icon" was just the thumbnail view of the page therefore would create a small file when saved. Unfortunately I am bring in high resolution PDF files that were created for print that are sometimes huge, so a file created by bringing in 6 pages will go above 100mb routinely. Is it possible to create this with a low resolution version only using the thumbnail that is embedded in the imported PDF?

Thanks! Any help is greatly appreciated.

Inspiring
June 20, 2013

If you're using Acrobat you have the ability to optimize the file after you import images. You cannot do this with Reader though.

Known Participant
July 3, 2013

Is there a way to have the picture take the whole space of the button rather than just put it in the middle?

Inspiring
October 1, 2012

Jay,

The new version of Reader, which was announced today (see AcrobatUsers.com), will now allow you to use the field.buttonImportIcon method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.737.html

For a bit more information, see: http://forums.adobe.com/thread/743823

Here's the minimum code that can be used in the Mouse Up event of a button that's configured with a layout that's something other than "Label only":

// Mouse Up script for a button

event.target.buttonImportIcon();

Since this isn't backwards compatible with Reader, you'll probably want to add additional code to test what version is being used and alert the user if it's pre-11. You should also check the return value to see if anything went wrong. The hard part is getting everyone to upgrade, but this and a number of other features should make it worth it.

Inspiring
October 1, 2012

Thank you, George. This is great news.

Do I need Adobe Acrobat XI Pro in order to create a button that Reader users can click to import their images?

When will Reader XI be available for download?

George_JohnsonCorrect answer
Inspiring
October 1, 2012

No, you don't need Acrobat 11 to create a form that uses this method, but your Reader users will need to upgrade. I don't see that they've announce the release date for Reader yet, but in the past it has usually been within about a month of the announcement.