Change custom annotations mounting corner

WebViewer Version: 8.0.0

Do you have an issue with a specific file(s)?
No
Can you reproduce using one of our samples or online demos?
No
Are you using the WebViewer server?
Yes
Does the issue only happen on certain browsers?
No
Is your issue related to a front-end framework?
Yes
Is your issue related to annotations?
Yes

When creating a non-resizable custom annotations with a custom images (pin icons), when resizing the document they are resized relatively to the top left corner of the annotation, and I need it to be resized relatively to the bottom center instead.

An example can be see here. Please consider the top left annotation:


Looking forward to the reply,
Michael

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi Michael,

Are you setting the property NoZoom = true in your custom annotations? When this property is set, the top left point is fixed. Currently there is no way to change this as the PDF spec doesn’t define a way for other locations of a NoZoom annotation to be fixed.

You have two options if you want a different behaviour.

  • Set your annotations to NoZoom = false, which would keep them fixed but result in your annotations to resize as you zoom in/out.
  • Add a listener to the zoomUpdated event, that loops through your custom annotations and adjusts their X,Y coordinates as the zoom level changes.

Best Regards,

Armando Bollain
Software Developer
PDFTron Systems, Inc.
www.pdftron.com