Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Choose 'No color'.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hello Thom,
Right after I posed my question/problem I had to take my Macbook Pro to the Apple Store. I ended up performing a re-install of Mojave after wiping the internal drive and have been installing everything separately, rather than using a quick install of everything via a clone or Time Machine. I just got Adobe's Creative Cloud installed again last night.
I have run the code for a couple of the images that I want to be checkboxes as well and the results are white or blue fill in colors. The images are never seen. I am using the correct names for each checkbox.
this.getField("Cheney").fillColor = ["T"];
this.getField("Greene").fillColor = ["T"];
Above is what I was entering. Not sure what I could be doing wrong, but it is my first time using the console.
Copy link to clipboard
Copied
Turn of 'Show border hover color for fields' in preferences -> forms.
Copy link to clipboard
Copied
I have done this now too and still no luck. I have included an screenshot of what I am trying to do. You can see the checkmark over a white field that is covering the image of the person that should be exposed, not covered up by a white, blue or any other color. It must be transparent.
I just did not think this could possibly be such a problem to perform.
Copy link to clipboard
Copied
This would make easier if you share file with us.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Eecute
this.getField("Cheney").fillColor = ["T"];
this.getField("Greene").fillColor = ["T"];
in the Javascript console of Acrobat.
Copy link to clipboard
Copied
Hi,
Are you sure you are on the latest ACrobat, as I have a transparent checkbox in the same dialog as you showed that achieves what you want.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
HI,
It is just the way JavaScript handles it, so the code that @Bernd Alheit showed you is how you set a field to be transparent, so in order to make that change you have to alter the color setting.
this.getField("Cheney").fillColor = ["T"];
(the "T" just means transparent)
Copy link to clipboard
Copied
I do not understand what you are saying?
Didn't I already do what I was told to do by @Bernd Alheit ? If not, then what I am supposed to do?
This is so damned crazy! NOTHING SHOULD BE THIS DIFFICULT! This is not 1997 and Acrobat 3, this is 2021 and Acrobat DC or whatever.
This is just is not important enough to fight through all of this. I just wanted a playful form to spoof some friends.
Copy link to clipboard
Copied
How have you executed the scripts?
Copy link to clipboard
Copied
I do NOT know!!!! That's what I am asking you!!!! Have I, haven't I? I do not do code. I did what I was told to do. For code, if a single step it left out of the instructions, then it don't happen.
How to execute other than with a loaded gun?
Copy link to clipboard
Copied
See if this works for you:
https://drive.google.com/uc?export=download&id=1Da4l-6XZhNhmcoPv0W2bJLA7iUWnQNBT
Copy link to clipboard
Copied
That almost works! But the image needs to be shown ALL the time, no matter whether it is clicked or not. I just want a check mark to go over the always seen image which is also a checkbox. Thanks for helping.
And then I was going to do the same for the images of Gaetz and Kinzinger too.
Copy link to clipboard
Copied
Remove the code added to the fields. You don't need it. You just need them to be transparent.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes!!! Exactly what I have been hoping to have happen! Thanks.
What did you do that was different than what I did?
Copy link to clipboard
Copied
I gave the two related check boxes the same name. Then put the politician's name as the export value. Then I set the background and border colors to transparent. I did all this from Field Properties dialog. No scripting necessary. But that's because I have the "No Color" option.
Copy link to clipboard
Copied
Firstly Thom, thanks for figuring this out for me. I knew it could be done.
However, this is also very frustrating, because you have the color option. As someone that has had a licensed copy of Acrobat since Arcobat 3 back in April 1997, this makes no sense. IF I were using Acrobat 3 and you were using Acrobat 4, it would be very understandable that my version does not have the option.
As I had mentioned earlier I had to reinstall the Mac OSX and then I started to load back in apps, email accounts, contacts and such separately, one at a time. It was only a couple of days ago that I reinstalled the Creative Cloud and it installed all the Adobe apps. Just a few minutes ago I doubled clicked on the PDF that I've been working on and it opened in Preview rather than Acrobat. So I went to "Get Info" to set it so all PDFs open via Acrobat, which it was yesterday. Acrobat was no longer in my Applications folder! Huh?
I go to the Creative Cloud and have it install Acrobat. I open the original PDF form I have been working on. Now, finally there is a transparent check box! Go figure! So of course I have to go back to my other Mac, which is where I started this project. It was bought in February 2012 and now running Yosemite. It is using Acrobat version 2017.009.20044.
Standing by what I said three paragraphs ago, I am not still using Acrobat 3 and it is not 1997. But 20 years later there still wasn't a transparent option? WTF? The screenshot is from a couple minutes ago, version 2017.
Again, thanks for all the help and suggestions!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now