Highlight text and persist before rendering pdf

Detailed description of issue
Upon loading a PDF we are wanting to highlight specific parts of PDF and persist them upon scrolling. This is an extension to Programmatically highlight text upon searching . We have looked at the suggested method however we are struggling to keep the highlight persisted.

We also wish to learn how we can restrict the pdf web worker from loading each time a new document is loaded (by giving it a new file name to load).

We would appreciate if we could even jump on a call and show what we are trying to achieve and could use some help.

Hi,

I’d like to confirm if the text position sample is what you are look for? That sample highlights text after the document is loaded, and the highlight annotations are persisted upon scrolling. If this is not what you looking for, please be more specific about your use case. Also if you could elaborate about what part you are struggling with, that can be helpful.

Thanks,
Zhijie

Hi there!

Just following up about the PDF worker getting reloaded. This is the default functionality of the open source PDF.js library, but I think I found a solution for this that we can implement on our end. I will try it out and keep you posted.

EDIT: Found a solution for this, will be fixed in next release (which is happening monday)

Thanks,
Logan