Skip to main content
Known Participant
October 23, 2021
Question

Making an image become a checkbox

  • October 23, 2021
  • 1 reply
  • 9861 views

I would like to put two images side by side and give the viewer a choice to which they want. They would choose by clicking either of the images which then becomes a checkbox. It would be perferrable for a the check mark to appear over the image, leaving the image to still be seen.

 

I have not been able to figure this out on my own. Any help is much appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 23, 2021

Place the check-boxes on top of the images and set their fill color to Transparent (or No Color).

However, the tick mark itself will still (partially) cover the selected image. Wouldn't it make more sense to place it elsewhere?

RgatorAuthor
Known Participant
October 23, 2021

When I go to properties and to fill color, I cannot find a means to make it transparent. And no, I would rather the check mark to be placed over the image.

 

Is there a Hex Number for transparent?

Thom Parker
Community Expert
Community Expert
October 25, 2021

I wish I could, but there is no such option!!!

 

This is why I am asking for help. I have been using Acrobat since Acrobat 3 in 1997. I would have thought something like this would be simple to do. I tried for a couple of hours last night before posting today.


I don't use a Mac, but pretty sure that on both Mac and Win that Acrobat has it's own first level color picker that provides a "No Color" option. There is also a "More Colors..." option that then displays the system color picker. 

This must be something from a recent update for the Mac Version.

 

Looks like you'll need to do this from the console window. Here's the code for setting a color fill to Transparent

 

this.getField("CheckBox1").fillColor = ["T"];

 

Run this code in the console window. Replace "CheckBox1" this the name of your checkbox field.

 

You'll find a video tutorial on using the console window here:

https://www.pdfscripting.com/public/Free_Videos.cfm#JSIntro

 

   

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often