Copy link to clipboard
Copied
Hi,
I want to draw check box by program in Adobe Acrobat DC. app.listToolbarButtons() returns nothing. I am unable to find the cName for check box tool. If i am trying to call using execMenuItem that also not possible. can any one help me on his.
Thanks
Ariv
Copy link to clipboard
Copied
You should use the addField method of the Document object if you want to add a check-box field.
Copy link to clipboard
Copied
Hi,
I wanted to add the check box at the position where the mouse is in. I wanted to execute the 'check box' tool through program. if i have executed that check box tool then i can able to draw the check box.
If you are suggesting any other method of drawing checkbox, that is also ok for me.
Thank you
Copy link to clipboard
Copied
That's possible, but it means you will have to execute the command using only the keyboard, which is a bit tricky (but not impossible)...
You can use the mouseX and mouseY properties of the Document object to get the current location of the mouse, in default user space in relation to the current page.
Copy link to clipboard
Copied
Just to clarify, I'm still talking about using addField. I don't think it can be done the way you've described.
Copy link to clipboard
Copied
If you don't need the checkbox to be responsive to checks... meaning you just want a checked checkbox, not a checkbox field, you can use a stamp rather than addField.
If you want JavaScript to capture the mouse coordinates, you'll need to cover the entire page with a button field which may not be practical.
J-
Copy link to clipboard
Copied
If you want JavaScript to capture the mouse coordinates, you'll need to cover the entire page with a button field which may not be practical.
Not true. You can use the mouseX and mouseY properties, as I've mentioned.
Edit: Unless you mean that the button will also trigger the script itself, in which case you're correct. But it can still be done using the keyboard if the button is added to the application menus.
Copy link to clipboard
Copied
Thank you very much.
Copy link to clipboard
Copied
Thank you very much.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now