Do we have the capability for programmatically highlighting?

Which product are you using?

PDF.js Express Version

Detailed description of issue
We are trying to evaluate the plus version and would like to incorporate to our system. Couple of questions if this is supported on the plus / custom version

  1. Do we have the functionality to programmatically retrieve highlighted text? The concept involves enabling users to highlight specific sentences or words, with the ability for us to capture the text and save it in our system.

  2. Can we programmatically highlight text and sentences? We aim to dynamically highlight or color text or sentences in the PDF, with the content originating from our system. Can we highlight this based on some vector instead of text?

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 raygan.lasic,

  1. Get highlighted text from a highlight annotation:
<instance of a highlight annotation>.getCustomData('trn-annot-preview');
  1. Creating highlights programatically with coordinates: PDF.js Express Highlight Annotation | Documentation

Let me know if you have any additional questions

Best regards,
Tyler