Show limited color options while changing color of an annotation

New Here ,
Jul 06, 2022 Jul 06, 2022

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?

TOPICS
PDF Embed API

Views

24

Likes

Translate

Translate

Report

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
New Here ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

LATEST

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.

Likes

Translate

Translate

Report

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
Resources