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

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

Enthusiast ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

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?

TOPICS
PDF forms

Views

77.8K

Translate

Translate

Report

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
LEGEND ,
Oct 01, 2012 Oct 01, 2012

Copy link to clipboard

Copied

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.

View solution in original post

Votes

Translate

Translate

Report

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 ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

LATEST

Hi, did you manage to get this working? I'm looking to do exactly the same but cannot figure it out

Votes

Translate

Translate

Report

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
Enthusiast ,
Jun 24, 2016 Jun 24, 2016

Copy link to clipboard

Copied

The sample PDF that George originally uploaded in 2013 as an example of how to Clear a button image field is no longer available since Adobe Workspace has been discontinued.

Thus, here's the script used... You would add this to a separate (3rd) button to grab the icon of a "blank" button and use it to set the desired button's icon status:

var f = this.getField("Button1"); //This is your button serving as your "image field", thus rename as needed

var g = this.getField("Blank");//This another button with an "Icon only" layout but NO icon is set

var temp = g.buttonGetIcon();//place holder variable to hold the Blank button icon details

f.buttonSetIcon(temp); //Set image field button to match the Blank (temp) button

Hope this helps!

Votes

Translate

Translate

Report

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
Guest
Feb 26, 2014 Feb 26, 2014

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 27, 2014 Feb 27, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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 ,
Sep 09, 2014 Sep 09, 2014

Copy link to clipboard

Copied

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

Thanks,

Votes

Translate

Translate

Report

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
Explorer ,
Sep 09, 2014 Sep 09, 2014

Copy link to clipboard

Copied

Plob,

what are you needing to accomplish?

Votes

Translate

Translate

Report

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 ,
Sep 09, 2014 Sep 09, 2014

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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 ,
Sep 09, 2014 Sep 09, 2014

Copy link to clipboard

Copied

No.

Votes

Translate

Translate

Report

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 ,
Mar 27, 2015 Mar 27, 2015

Copy link to clipboard

Copied

The .buttonImportIcon() function does work with JPG and other image formats, but after clicking the "Browse" button to select an image, the user needs to change the file type to JPG or another image format.  Once they do that, they can select that file format and it displays just fine.  I have not found a way to change the default file type in the file browser, but it does work.

Votes

Translate

Translate

Report

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 ,
Mar 28, 2015 Mar 28, 2015

Copy link to clipboard

Copied

The .buttonImportIcon() function does work with JPG and other image formats

That's only true in Acrobat, not in Reader, where only PDF files can be selected.

Votes

Translate

Translate

Report

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
Explorer ,
Nov 16, 2015 Nov 16, 2015

Copy link to clipboard

Copied

Yes the button function does not work in any acrobat reader versions, but it works in Foxit reader (free reader) there are lots of other functions in the foxit version I now have my form users using Foxit reader so they can insert jpg images into me forms.

Mike

Votes

Translate

Translate

Report

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 Beginner ,
Oct 01, 2014 Oct 01, 2014

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 01, 2014 Oct 01, 2014

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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 Beginner ,
Oct 01, 2014 Oct 01, 2014

Copy link to clipboard

Copied

That's exactly what happened !  Thanks so much

Votes

Translate

Translate

Report

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 ,
Oct 01, 2014 Oct 01, 2014

Copy link to clipboard

Copied

Is there a way to protect the Java code fro that? I did not know that java code was so sensible.

Paulo Bettencourt

No dia 02/10/2014, às 02:48, "abu117a" <forums_noreply@adobe.com<mailto:forums_noreply@adobe.com>> escreveu:

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

created by abu117a<https://forums.adobe.com/people/abu117a> in PDF Forms - View the full discussion<https://forums.adobe.com/message/6782962#6782962>

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

The problem is with Preview and how it corrupts PDFs. Once the damage is done it cannot be undone. Apple doesn't seem interested in fixing this longstanding problem.

Votes

Translate

Translate

Report

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 ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

This is only in Mac or it appens also in windows? I had a similar complaint that I could not diagnose.

No dia 02/10/2014, às 09:54, "George Johnson" <forums_noreply@adobe.com<mailto:forums_noreply@adobe.com>> escreveu:

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

created by George Johnson<https://forums.adobe.com/people/George_Johnson> in PDF Forms - View the full discussion<https://forums.adobe.com/message/6783577#6783577>

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

Preview is only available on the Mac. The problem on Windows was probably due to not using Reader 11 or Acrobat. The buttonImportIcon method was (re)introduced to Reader with version 11, so it's not available in versions from 6 to 10.

Votes

Translate

Translate

Report

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 ,
Oct 15, 2014 Oct 15, 2014

Copy link to clipboard

Copied

Can a parameter be used for the file name and path?

buttonImpoortIcon("filepath/filename")

I have created a javescript  getSignature.js.  I am using Acrobat Standard 11 and Reader XI.

getSignature = app.trustedFunction(function()

{

var f = this.getField("signButton");

f.fillColor = color.transparent;

app.beginPriv();

f.buttonImportIcon("/M/path/m.pdf");

app.endPriv();

}

)

In Acrobat I have a pdf with a button signButton, set to Icon Only, color green, with a Mouse up event to run a javascript getSignature();

This appears to work in Acrobat, but when I try it in Reader, it clears the button color, but does not pull the pdf into the button.  If I leave the parameter for the file path and name, it will open the dialog box and I can select an image, but I would like the image inserted without the user doing anything or just clicking the button without making a selection.

I have seen many place where you have responded to use f.buttonImportIcon(), and was wondering if Reader can accept a parameter?

-Michele

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 15, 2014 Oct 15, 2014

Copy link to clipboard

Copied

Yes, you can use a path, but you also need to specify a page number. This is all in the documentation, which is included in the Acrobat SDK. Also here: http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?h...

Votes

Translate

Translate

Report

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 ,
Mar 30, 2015 Mar 30, 2015

Copy link to clipboard

Copied

Oh sad, thanks for pointing that out to me.

Votes

Translate

Translate

Report

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 ,
May 18, 2015 May 18, 2015

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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
LEGEND ,
May 18, 2015 May 18, 2015

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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 ,
Oct 06, 2015 Oct 06, 2015

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 07, 2015 Oct 07, 2015

Copy link to clipboard

Copied

Yes, but you have to use a script. Here's a link to a previous discussion that has more info: How to remove an icon in a button

Votes

Translate

Translate

Report

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