Undo/redo buttons throw an error after upgrading to WebViewer 7.3.3

WebViewer Version: 7.3.3

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? NO
Does the issue only happen on certain browsers? NO
Is your issue related to a front-end framework? YES (ANGULAR)
Is your issue related to annotations? YES

Please give a brief summary of your issue:
Undo/redo buttons throw an error after upgrading to WebViewer 7.3.3

Please describe your issue and provide steps to reproduce it:

  • Upgrade from 7.2.0 to 7.3.3
  • Draw an annotation
  • click undo : not working
  • check the console

1 Like

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 there,
I tried to reproduce this undo/redo button throwing an error issue, but I was not able to reproduce it. Do you have any kind of customization added to WebViewer?

Steps to reproduce:
1.
add the following line :


 [
  'AnnotationCreateFreeHand',
  'AnnotationCreateLine',
  'AnnotationCreatePolyline',
  'AnnotationCreateArrow',
  'AnnotationCreatePolygonCloud',
  'AnnotationCreateTextHighlight',
  'AnnotationCreateCallout',
  'AnnotationCreateTextStrikeout',
  'TextSelect'
    ].forEach(tool => {
          this.wvInstance.unregisterTool(tool);
    });
  1. use the rectangle / free - text tool

  2. undo it

error should occur

Anthony Chen

Would you be able to give more details of why unregistering the tools and after you are using it? If you are trying to remove these tools from UI, you also need to hide those menu buttons by using instance.disableElements API.

More info for hiding UI elements https://www.pdftron.com/documentation/web/guides/hiding-elements/#constructor-option