WebViewer Version: 8.2.0
Can’t highlight text programmatically, this is the code snippet:
instance.Core.documentViewer.addEventListener('documentLoaded', () => {
instance.Core.Tools.Tool.enableTextSelection();
const tool = new instance.Core.Tools.TextStrikeoutCreateTool(instance.Core.documentViewer);
const annotation = new instance.Core.Annotations.TextStrikeoutAnnotation();
annotation.PageNumber = 1;
tool.annotation = annotation;
const topLeft = { x: 400, y: 400, pageIndex: 0};
const bottomRight = { x: 800, y: 800, pageIndex: 0};
tool.pageCoordinates[0] = topLeft;
tool.select(topLeft, bottomRight);
instance.Core.annotationManager.addAnnotation(annotation);
instance.Core.annotationManager.redrawAnnotation(annotation);
});
Annotation is created and located upper left without any text highlighted.
Am I doing something wrong? Thanks!