Programmatically highlight area on pdf using coordinates or quads

PDF.js Express Version

Detailed description of issue
Hi team ,
Is there a way to highlight the area on a pdf if I am getting the area coordinates from server. I could find how to highlight a searched text on your documentation but is there a way to just highlight something if I only have the coordinates not the text.

Please let me know your incites on this .

Expected behaviour
{Provide a screenshot or description of the expected behaviour}

Does your issue happen with every document, or just one?
{Answer here}

Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hi there,

Does it have to specifically be a highlight annotation? If you just have general coordinates a better solution might be to use a rectangle annotation and just set the fill color to look like a highlighter.