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

Making an image become a checkbox

Explorer ,
Oct 23, 2021 Oct 23, 2021

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.

TOPICS
Create PDFs , How to , PDF forms , Rich media and 3D
9.7K
Translate
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 ,
Nov 05, 2021 Nov 05, 2021

Several years ago there was a bug in Acrobat (for Macs) where the No Color option would not appear. It was since solved but it seems you still use that buggy version.

Translate
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 ,
Nov 04, 2021 Nov 04, 2021

Execute the scripts in the Javascript console or use a action.

Translate
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 05, 2021 Nov 05, 2021

I thought that I did "execute the scripts" but I couldn't be sure, because I never saw anything happen. Is there a certain command to make the "execution" happen? All I did was hit return. I did ask earlier if there was anything special I had to do to complete the script.

Translate
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 ,
Nov 05, 2021 Nov 05, 2021

Select the script in the console and press cmd+enter.

Translate
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 06, 2021 Nov 06, 2021

You see? That part of the instruction was not in any of the posts and this is what I needed to know before I could answer if I had executed the scripts. No, I did not select the scripts and then press cmd+enter. All I did was make sure my cursor was at the end of the script and then I pressed enter. Like I had been saying, I do NOT do code. I am severely dyslexic and code does not mix.

 

So, days later I finally learned how to "execute" the script. Like I had mentioned before, the only way I knew before to execute the script would be with a gun and I do not own one.

Translate
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 ,
Nov 07, 2021 Nov 07, 2021
LATEST

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

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

 

Sorry I didn't post this earlier.  However, I'm sure I've already posted it at least a few hundred times on the forum over the last 10 years.    

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

Translate
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 ,
Nov 04, 2021 Nov 04, 2021

If you want to change between white/transparent when checkbox is checked, as 'Mouse UP' event of checkbox use this:

event.target.fillColor = event.target.value == "Off" ? color.white : color.transparent;

Translate
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