Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.