0
How Can I Use Javascript to Fill Shape Background Color with Hex Code?
New Here
,
/t5/acrobat-sdk-discussions/how-can-i-use-javascript-to-fill-shape-background-color-with-hex-code/td-p/9476354
Nov 18, 2017
Nov 18, 2017
Copy link to clipboard
Copied
On my PDF I have one form field where someone can input a hex code and to the right of that I have another box.
If possible, I would love to use Javascript to make it so when someone inputs a hex code it changes the fill color of the box to the right with that color.
Here is a screenshot of my PDF:
I'm not sure if this is possible, but fingers crossed it is
Important to note I have a very basic understanding of Javascript.
Thank you for your help,
Eric
TOPICS
Acrobat SDK and JavaScript
,
Windows
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-sdk-discussions/how-can-i-use-javascript-to-fill-shape-background-color-with-hex-code/m-p/9476355#M27465
Nov 18, 2017
Nov 18, 2017
Copy link to clipboard
Copied
Here is an article on using colors in Acrobat JavaScript
https://acrobatusers.com/tutorials/using-colors-acrobat-javascript
Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often
Use the Acrobat JavaScript Reference early and often
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

