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

How Can I Use Javascript to Fill Shape Background Color with Hex Code?

New Here ,
Nov 18, 2017 Nov 18, 2017

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:

PDFhex#.png

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
504
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 18, 2017 Nov 18, 2017
LATEST

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

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