How to disable or hide native PDF link / hotspot annotations in WebViewer

Hi everyone,

I’m working with Apryse WebViewer 11.3.0 and I’m facing an issue related to native hotspot / link annotations that already exist inside the PDF file.

Context

Some PDFs I receive already contain native hotspots / link annotations (e.g. Stamp / Link annotations created in the PDF itself).
When the document is loaded in WebViewer:

  • These native hotspots are immediately interactive

  • They show tooltips

  • They can be clicked, even before their visual appearance finishes rendering

  • They are exposed via annotationManager.getAnnotationsList() with subjects like:

    • HOTSPOT

    • htmlLink

    • imageLink

At the same time, my application also renders custom hotspots and loads user annotations via XFDF, which must continue to work normally.

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.


To disable or hide native PDF link/hotspot annotations in WebViewer, you can use the AnnotationManager to identify and manage these annotations. Since your application also needs to render custom hotspots and load user annotations via XFDF, you want to selectively hide or disable the native ones.

Some things you can try:

  • Use the getAnnotationsList() method from the AnnotationManager to retrieve all annotations currently in the document.

  • Filter the list to identify annotations with subjects like “HOTSPOT”, “htmlLink”, or “imageLink”.

  • Use the hideAnnotation() or deleteAnnotation() methods to hide or remove these specific annotations.

  • Ensure that your custom annotations are not affected by this filtering process.



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.

1 Like

Hello Keven,

Thank you for contacting Apryse Forums.

Are you trying to remove the native hotspots/link annotations in the PDF? Once you retrieve the list of annotations, you can filter out the ones you want to delete and call the deleteAnnotations API to remove them from the PDF.

Best Regards,

Darian

1 Like

Thanks help me, solved!

1 Like