Get document text by paragraph or index

Product: WebViewer

Product Version: 8.9.0

Please give a brief summary of your issue:
Get document text by paragraph or index

Please describe your issue and provide steps to reproduce it:
If I have the paragraph number and character index position within that paragraph of text I need to be highlighted, is this possible to achieve? For example, paragraph: 1, start position: 5, end position: 20. I want the document to have the string slice in paragraph 1 from index 1 - 20 to be highlighted upon opening a document.

Thank you!

Edit: I want the document to have the string slice in paragraph 1 from index *5 - 20 to be highlighted upon opening a document.

Hi there,

Thank you for contacting WebViewer forum support,

If you have the search term, then you can use this guide to grab the quads using getTextPosition:

If you have the quads, you can use our search listener to create annotations after a match has been found:

Best regards,
Kevin Kim