Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems you’re encountering issues with the guide on creating text highlighting annotations using JavaScript, particularly with the quads property and the drawAnnotations function.
Some things you can try:
Ensure that the quads property is being assigned an array of Core.Math.Quad objects. This is crucial for defining the area of the text to be highlighted.
For the drawAnnotations function, make sure to pass an object that includes the pageNumber property. This specifies the page where the annotation should appear.
Check if you are using the latest version of the Apryse WebViewer and update if necessary, as this might resolve compatibility issues with the API.
Refer to the updated API documentation for the correct usage of these properties and functions.
The documentation uses sample Javascript code. For typescript, you can declare its types and it should be working as expected. Regarding the lines provided for example:
const quad = new Core.Math.Quad()
const quad2 = new Core.Math.Quad()
highlight.Quad = [quad, quad2]
annotationManager.drawAnnotations({ pageNumber: highlight.PageNumber });