Skip to main content
Inspiring
April 17, 2024
Question

How attach a picture to an icon?

  • April 17, 2024
  • 1 reply
  • 1159 views

I want to attach a picture such as a GIF or a JPG about 640 x 659 pixels in size to an icon such that when the icon is clicked the picture will open full size in a floating window. My method has been to use Add Video and simply point the icon the the picture (a GIF actually). However, when I do so the  picture never appears in the folder where I expect to find it. 

 

I don't know, but one guess is that the folder is set up for video, and it decides on that basis simply not to show the GIF. So maybe I should put it in its own folder by itself? But before I try that and still other possible solutions, could someone tell me if  there a standard approved way to do this instead?

 

Thanks!

1 reply

Luke Jennings3
Community Expert
Community Expert
April 17, 2024

Is the icon an element in the pdf or is it the picture representing a file? If it's on the pdf, you can create a button from the icon and set the button properties to run a javascript-

this.exportDataObject({ cName: "flowers.jpg", nLaunch: 2 });

This will open an image attached to the pdf, in the example, the name of the attachment is flowers.jpg

Acrobat & Reader will warn you about opening an image in another application, but if the image is a pdf you won't see the message.

I have attached a demo pdf.

PeytonTAuthor
Inspiring
April 20, 2024

Thanks for your answer, which I was unaware of, probably because I forgot the check the box asking to be notified of replies. I saw it only now, when I went to the forum to announce the solution that I had reached, which was virtually the same as yours: what I did was stuff a tiny picture about the size of an icon into the PDF, then attach a button to it and select Open a File as the button's action, which was fortunate since at my advanced age I'm past the days when I could easily write javascript!