WebViewer Version: 8.7.0
“No” to all of these questions:
- Do you have an issue with a specific file(s)?
- Can you reproduce using one of our samples or online demos?
- Are you using the WebViewer server?
- Does the issue only happen on certain browsers?
- Is your issue related to a front-end framework?
Is your issue related to annotations? Yes
Is it possible to only display an annotation when hovering over a defined hit area within the WebViewer’s document?
You can control the visibility of each annotation: PDFTron Systems Inc. | Documentation. If you have an event, you can then toggle the visibility of the desired annotation.
Regarding an event, would there be a way to detect if a user’s cursor is hovering / entered into a defined “hit area” within the document?
For example, we are looking to display a green circle annotation when the user’s cursor enters the pink box:
The pink box would ideally be invisible to the end-user (and does not even need to be an actual annotation).
Here are the events available in DocumentViewer, some of them do contain coordinates from where this can be triggered: PDFTron WebViewer Class: DocumentViewer.
Oh cool, thanks! We’ll explore this direction.