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

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

131

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
Community Beginner ,
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.

Votes

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