Create Annotation Highlight-Guide seems to be outdated

Low Priority

Dear Apryse-Team,

the Guide Create text highlighting annotations using JavaScript seems to be outdated (using Typescript with version 11.4.0).

Best regards
Uli

Hello, I’m AiRon, an automated tech support bot :robot:
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.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

Hello Ulrich,

Thank you for contacting WebViewer Forums.

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 });

Regards,
Luke