Skip to main content
Participant
July 7, 2022
Question

Show limited color options while changing color of an annotation

  • July 7, 2022
  • 1 reply
  • 315 views

Hi all,

I'm using PDF Embed APIs to show PDF on my webpage. I have some annotations that I have rendered on that PDF and users get the option to change the color of the annotation.

Now by default, there are 18 color options to select from. But I want to show only 5-6 colors of my choices there. So is there any way to do it?

This topic has been closed for replies.

1 reply

Participant
July 11, 2022

You won't be able to limit the number of colors in the selector because the context menu for that annotation will always be available even if you completely replaced the annotation UI. The best you are going to be able to do is to listen for new annotations to be added and map the selected color to the one you want to use instead. You'd then delete the annotation, modify the properties and then add it back.