Migrating to V10 of WebViewer

There are a few breaking changes and other deprecated APIs when migrating to v10 from older versions.

Browser support

Starting with WebViewer 10, WebViewer will no longer support IE11. If you still need IE11 while transitioning to a modern browser, then please download WebViewer version 8.12 or below.

Apryse SDK Version Synchronization

Starting with WebViewer 10, the Apryse SDK version will be synchronized with the WebViewer version. This means that the Apryse SDK version will be the same as the WebViewer version. For example, WebViewer 10 will use Apryse SDK 10.

Namespace changes

The Core object is now the entrypoint for the Annotations, PDFNet, Actions, utils, and Tools namespace.

Example:

sh

1instance.Core.Annotations
2instance.Core.Tools
3instance.Core.PDFNet
4instance.Core.utils
5instance.Core.Actions

If you are using a custom UI, these would be accessed via the window object: Example:

JavaScript

1window.Core.Annotations
2...

To access the annotationManager and documentViewer objects from the instance you must also use the Core namespace. Note the name change as well for both:

So the following:

JavaScript

1instance.annotManager
2instance.docViewer

Should now be:

JavaScript

1instance.Core.annotationManager
2instance.Core.documentViewer

XfdfUtils has been renamed XFDFUtils in the Annotation namespace. Example of new usage:

JavaScript

1Core.Annotations.XFDFUtils

Breaking changes

removeEventListener no longer allows removing an event listener globally. Instead, when calling this API you must specify the function that will be removed for the event listener. If a function is not passed, then you must specify a namespace with the event name. The namespace should match the one you used when adding the event listener. Examples:

JavaScript

1Core.ContentEdit.removeEventListener('textContentUpdated', fn);
2Core.ContentEdit.removeEventListener('textContentUpdated.namespace');

APIs removed

Previously deprecated APIs that have been removed:

Document

DocumentViewer

Bookmark

Annotations

XFDFUtils

AnnotationManager

Tools

Core

Webviewer UI

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales