> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/migration-guides/migrating-to-v10.md).

# Migrating to V10 of WebViewer

Migrate smoothly to WebViewer v10 with this guide on breaking changes, deprecated APIs, and namespace updates. Learn about browser support, SDK version synchronization, and more! The Apryse Web SDK st

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](/web/get-started/download.md) 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:

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
instance.Core.Annotations
instance.Core.Tools
instance.Core.PDFNet
instance.Core.utils
instance.Core.Actions
```

{% endcode %}
{% endtab %}
{% endtabs %}

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

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
window.Core.Annotations
...
```

{% endcode %}
{% endtab %}
{% endtabs %}

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:

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
instance.annotManager
instance.docViewer
```

{% endcode %}
{% endtab %}
{% endtabs %}

Should now be:

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
instance.Core.annotationManager
instance.Core.documentViewer
```

{% endcode %}
{% endtab %}
{% endtabs %}

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

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
Core.Annotations.XFDFUtils
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Breaking changes

[removeEventListener](https://sdk.apryse.com/api/web/Core.EventHandler.html#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:

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
Core.ContentEdit.removeEventListener('textContentUpdated', fn);
Core.ContentEdit.removeEventListener('textContentUpdated.namespace');
```

{% endcode %}
{% endtab %}
{% endtabs %}

## APIs removed

Previously deprecated APIs that have been removed:

### Document

* `Document.loadCanvasAsync` has been removed, please use [Document.loadCanvas](https://sdk.apryse.com/api/web/Core.Document.html#loadCanvas__anchor)
* `Document.loadThumbnailAsync` has been removed, please use [Document.loadThumbnail](https://sdk.apryse.com/api/web/Core.Document.html#loadThumbnail__anchor)
* `Document.setOfflineModeEnabled` has been removed, please use [Document.enableOfflineMode](https://sdk.apryse.com/api/web/Core.Document.html#enableOfflineMode) and [Document.disableOfflineMode](https://sdk.apryse.com/api/web/Core.Document.html#disableOfflineMode)
* `Document.documentCompletePromise` has been removed, please use [Document.getDocumentCompletePromise](https://sdk.apryse.com/api/web/Core.Document.html#getDocumentCompletePromise)

### DocumentViewer

* `DocumentViewer.loadAsync` has been removed please use [DocumentViewer.loadDocument](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#loadDocument)
* `DocumentViewer.setEnableAutomaticLinking` has been removed, please use [DocumentViewer.enableAutomaticLinking](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableAutomaticLinking) and [DocumentViewer.disableAutomaticLinking](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableAutomaticLinking)
* `DoumentViewer.setLoadAnnotationsFromVisiblePages` has been removed, please use [DocumentViewer.enableLoadingAnnotationsFromVisiblePages](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableLoadingAnnotationsFromVisiblePages) and [DocumentViewer.disableLoadingAnnotationsFromVisiblePages](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableLoadingAnnotationsFromVisiblePages)
* `DocumentViewer.setOptions` has been removed, please use [DocumentViewer.enableAnnotations](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableAnnotations) and [DocumentViewer.disableAnnotations](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableAnnotations)
* `DocumentViewer.getZoom` has been removed, please use [DocumentViewer.getZoomLevel](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#getZoomLevel)
* `DocumentViewer.setEnableStylusMode` has been removed, please use [DocumentViewer.enableStylusMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableStylusMode) and [DocumentViewer.disableStylusMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableStylusMode)
* `DocumentViewer.getRightToLeftPages` has been removed, please use [DocumentViewer.isRightToLeftPageRenderingEnabled](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#isRightToLeftPageRenderingEnabled)
* `DocumentViewer.setRightToLeftPages` has been removed, please use [DocumentViewer.enableRightToLeftPageRendering](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableRightToLeftPageRendering) and [DocumentViewer.disableRightToLeftPageRendering](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableRightToLeftPageRendering)
* `DocumentViewer.setViewportRenderMode` has been removed, please use [DocumentViewer.enableViewportRenderMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableViewportRenderMode) and [DocumentViewer.disableViewportRenderMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableViewportRenderMode)
* `DocumentViewer.enableGrayscaleAnnotations` has been removed, please use [DocumentViewer.enableGrayscaleAnnotationsMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#enableGrayscaleAnnotationsMode)
* `DocumentViewer.disableGrayscaleAnnotations` has been removed, please use [DocumentViewer.disableGrayscaleAnnotationsMode](https://sdk.apryse.com/api/web/Core.DocumentViewer.html#disableGrayscaleAnnotationsMode)

### Bookmark

* `Bookmark.getHpos` has been removed, please use [Bookmark.getHorizontalPosition](https://sdk.apryse.com/api/web/Core.Bookmark.html#getHorizontalPosition)
* `Bookmark.getVPos` has been removed, please use [Bookmark.getVerticalPosition](https://sdk.apryse.com/api/web/Core.Bookmark.html#getVerticalPosition)

### Annotations

* `Annotation.setRotationControlEnabled` has been replaced with [Annotation.setRotationControlEnabled.enableRotationControl](https://sdk.apryse.com/api/web/Core.Annotations.Annotation.html#enableRotationControl) and [Annotation.setRotationControlEnabled.disableRotationControl](https://sdk.apryse.com/api/web/Core.Annotations.Annotation.html#disableRotationControl)
* `Annotations.Forms.Field.setVisible` has been replaced with [Annotations.Forms.Field.show](https://sdk.apryse.com/api/web/Core.Annotations.Forms.Field.html#show) and [Annotations.Forms.Field.hide](https://sdk.apryse.com/api/web/Core.Annotations.Forms.Field.html#hide)
* `Annotations.LineAnnotation.getCenterLeaderPoint` has been replaced with [Core.Annotations.LineAnnotation.getLeaderLineControlHandlePoint](https://sdk.apryse.com/api/web/Core.Annotations.LineAnnotation.html#getLeaderLineControlHandlePoint)
* `Annotations.PopupAnnotation.setOpen` has been replaced with [Annotations.PopupAnnotation.open](https://sdk.apryse.com/api/web/Core.Annotations.PopupAnnotation.html#open) and [Annotations.PopupAnnotation.close](https://sdk.apryse.com/api/web/Core.Annotations.PopupAnnotation.html#close)

### XFDFUtils

* `XfdfUtils.toXmlDate` has been replaced with [XFDFUtils.toXmlDate](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.toXmlDate)
* `XfdfUtils.serializePoint` has been replaced with [XFDFUtils.serializePoint](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.serializePoint)
* `XfdfUtils.deserializePoint` has been replaced with [XFDFUtils.deserializePoint](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.deserializePoint)
* `XfdfUtils.serializePointArray` has been replaced with [XFDFUtils.serializePointArray](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.serializePointArray)
* `XfdfUtils.deserializePointArray` has been replaced with [XFDFUtils.deserializePointArray](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.deserializePointArray)
* `XfdfUtils.serializeRect` has been replaced with [XFDFUtils.serializeRect](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.serializeRect)
* `XfdfUtils.deserializeRect` has been replaced with [XFDFUtils.deserializeRect](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.deserializeRect)
* `XfdfUtils.serializeFringeRect` has been replaced with [XFDFUtils.serializeFringeRect](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.serializeFringeRect)
* `XfdfUtils.deserializeFringeRect` has been replaced with [XFDFUtils.deserializeFringeRect](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.deserializeFringeRect)
* `XfdfUtils.serializeMeasure` has been replaced with [XFDFUtils.serializeMeasure](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.serializeMeasure)
* `XfdfUtils.deserializeMeasure` has been replaced with [XFDFUtils.deserializeMeasure](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.deserializeMeasure)
* `XfdfUtils.parseDefaultAppearance` has been replaced with [XFDFUtils.parseDefaultAppearance](https://sdk.apryse.com/api/web/Core.Annotations.XFDFUtils.html#.parseDefaultAppearance)

### AnnotationManager

* `AnnotationManager.getIsAdminUser` has been replaced with [AnnotationManager.isUserAdmin](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#isUserAdmin)
* `AnnotationManager.setIsAdminUser` has been replaced with [AnnotationManager.promoteUserToAdmin](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#promoteUserToAdmin) and [AnnotationManager.demoteUserFromAdmin](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#demoteUserFromAdmin)
* `AnnotationManager.getReadOnly` has been replaced with [AnnotationManager.isReadOnlyModeEnabled](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#isReadOnlyModeEnabled)
* `AnnotationManager.setReadOnly` has been replaced with [AnnotationManager.enableReadOnlyMode](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#enableReadOnlyMode) and [AnnotationManager.disableReadOnlyMode](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#disableReadOnlyMode)
* `AnnotationManager.isFreeformRotationEnabled` has been replaced with [AnnotationManager.getRotationOptions](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#getRotationOptions)
* `AnnotationManager.setFreeformRotationEnabled` has been replaced with [AnnotationManager.setRotationOptions](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#setRotationOptions)
* `AnnotationManager.enableFreeformRotation` has been replaced with [AnnotationManager.setRotationOptions](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#setRotationOptions)
* `AnnotationManager.disableFreeformRotation` has been replaced with [AnnotationManager.setRotationOptions](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#setRotationOptions)
* `AnnotationManager.useFreeTextEditing` has been replaced with [AnnotationManager.isFreeTextEditingEnabled](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#isFreeTextEditingEnabled)
* `AnnotationManager.setRedrawThrottle` has been replaced with [AnnotationManager.setRedrawThrottleRate](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#setRedrawThrottleRate)
* `AnnotationManager.exportAnnotCommand` has been replaced with [AnnotationManager.exportAnnotationCommand](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#exportAnnotationCommand)
* `AnnotationManager.importAnnotCommand` has been replaced with [AnnotationManager.importAnnotationCommand](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#importAnnotationCommand)

### Tools

* `Tools.AnnotationSelectTool.setEnableImmediateActionOnAnnotationSelection` has been replaced with [AnnotationSelectTool.enableImmediateActionOnAnnotationSelection](https://sdk.apryse.com/api/web/Core.Tools.AnnotationSelectTool.html#enableImmediateActionOnAnnotationSelection) and [AnnotationSelectTool.disableImmediateActionOnAnnotationSelection](https://sdk.apryse.com/api/web/Core.Tools.AnnotationSelectTool.html#disableImmediateActionOnAnnotationSelection)
* `Tools.CalloutCreateTool.setEnableAutoSized` has been replaced with [CalloutCreateTool.enableAutoSizedTextBox](https://sdk.apryse.com/api/web/Core.Tools.CalloutCreateTool.html#enableAutoSizedTextBox) and [CalloutCreateTool.disableAutoSizedTextBox](https://sdk.apryse.com/api/web/Core.Tools.CalloutCreateTool.html#disableAutoSizedTextBox)
* `Tools.DistanceMeasurementCreateTool.setEnableLeaderLines` has been replaced with [DistanceMeasurementCreateTool.setLeaderLineDefaultOptions](https://sdk.apryse.com/api/web/Core.Tools.DistanceMeasurementCreateTool.html#setLeaderLineDefaultOptions)
* `Tools.DistanceMeasurementCreateTool.enableLeaderLines` has been replaced with [DistanceMeasurementCreateTool.setLeaderLineDefaultOptions](https://sdk.apryse.com/api/web/Core.Tools.DistanceMeasurementCreateTool.html#setLeaderLineDefaultOptions)
* `Tools.DistanceMeasurementCreateTool.disableLeaderLines` has been replaced with [DistanceMeasurementCreateTool.setLeaderLineDefaultOptions](https://sdk.apryse.com/api/web/Core.Tools.DistanceMeasurementCreateTool.html#setLeaderLineDefaultOptions)
* `Tools.PolylineCreateTool.setAllowCreationOverAnnotation` has been replaced with [PolylineCreateTool.enableCreationOverAnnotation](https://sdk.apryse.com/api/web/Core.Tools.PolylineCreateTool.html#enableCreationOverAnnotation) and [PolylineCreateTool.disableCreationOverAnnotation](https://sdk.apryse.com/api/web/Core.Tools.PolylineCreateTool.html#disableCreationOverAnnotation)
* `Tools.RedactionCreateTool.setEnableTextAutoSize` has been replaced with [RedactionCreateTool.enableAutoSizedText](https://sdk.apryse.com/api/web/Core.Tools.RedactionCreateTool.html#enableAutoSizedText) and [RedactionCreateTool.disableAutoSizedText](https://sdk.apryse.com/api/web/Core.Tools.RedactionCreateTool.html#disableAutoSizedText)
* `Tools.StickyCreateTool.setAllowCreationOverAnnotation` has been replaced with [StickyCreateTool.enableCreationOverAnnotation](https://sdk.apryse.com/api/web/Core.Tools.StickyCreateTool.html#enableCreationOverAnnotation) and [StickyCreateTool.disableCreationOverAnnotation](https://sdk.apryse.com/api/web/Core.Tools.StickyCreateTool.html#disableCreationOverAnnotation)
* `Tools.StickyCreateTool.setSaveViewState` has been replaced with [StickyCreateTool.enableViewStateSaving](https://sdk.apryse.com/api/web/Core.Tools.StickyCreateTool.html#enableViewStateSaving) and [StickyCreateTool.disableViewStateSaving](https://sdk.apryse.com/api/web/Core.Tools.StickyCreateTool.html#disableViewStateSaving)

### Core

* `Core.office2PDFBuffer` has been replaced with [Core.officeToPDFBuffer](https://sdk.apryse.com/api/web/Core.html#officeToPDFBuffer)
* `Core.EventHandler.on` has been replaced with [Core.EventHandler.addEventListener](https://sdk.apryse.com/api/web/Core.EventHandler.html#addEventListener)
* `Core.EventHandler.off` has been replaced with [Core.EventHandler.removeEventListener](https://sdk.apryse.com/api/web/Core.EventHandler.html#removeEventListener)
* `Core.EventHandler.one` has been replaced with [Core.EventHandler.addEventListener](https://sdk.apryse.com/api/web/Core.EventHandler.html#addEventListener) with `{ once: true }`
* `Core.setIsWindowsApp` has been replaced with [Core.setAsWindowsApp](https://sdk.apryse.com/api/web/Core.html#.setAsWindowsApp) and [Core.unsetAsWindowsApp](https://sdk.apryse.com/api/web/Core.html#.unsetAsWindowsApp)

### Webviewer UI

* `UI.setCustomModal` has been replaced with [UI.addCustomModal](https://sdk.apryse.com/api/web/UI.html#.addCustomModal)
* UI event `finishedSavingPDF` has been replaced with [fileDownloaded](https://sdk.apryse.com/api/web/UI.html#event:fileDownloaded)
* `UI.getIsHighContrastMode` has been replaced with [UI.isHighContrastModeEnabled](https://sdk.apryse.com/api/web/UI.html#.isHighContrastModeEnabled)
* `instance.isMobileDevice` has been removed
* `UI.setHighContrastMode` has been replaced with [UI.enableHighContrastMode](https://sdk.apryse.com/api/web/UI.html#.enableHighContrastMode) and [UI.disableHighContrastMode](https://sdk.apryse.com/api/web/UI.html#.disableHighContrastMode)
* `UI.showErrorMessage` has been replaced with [UI.displayErrorMessage](https://sdk.apryse.com/api/web/UI.html#.displayErrorMessage)
* `UI.toggleElement` has been replaced with [UI.toggleElementVisibility](https://sdk.apryse.com/api/web/UI.html#.toggleElementVisibility)
* `UI.getSelectedThumbnailPageNumbers` has been replaced with [UI.ThumbnailsPanel.getSelectedPageNumbers](https://sdk.apryse.com/api/web/UI.ThumbnailsPanel.html#.getSelectedPageNumbers)
* `UI.selectThumbnailPages` has been replaced with [UI.ThumbnailsPanel.selectPages](https://sdk.apryse.com/api/web/UI.ThumbnailsPanel.html#.selectPages)
* `UI.unselectThumbnailPages` has been replaced with [UI.ThumbnailsPanel.unselectPages](https://sdk.apryse.com/api/web/UI.ThumbnailsPanel.html#.unselectPages)
* `UI.updateOutlines` has been replaced with [UI.reloadOutline](https://sdk.apryse.com/api/web/UI.html#.reloadOutline)
* `UI.useNativeScroll` has been replaced with [UI.enableNativeScrolling](https://sdk.apryse.com/api/web/UI.html#.enableNativeScrolling) and [UI.disableNativeScrolling](https://sdk.apryse.com/api/web/UI.html#.disableNativeScrolling)
* `UI.setSortNotesBy` has been replaced with [UI.setNotesPanelSortStrategy](https://sdk.apryse.com/api/web/UI.html#.setNotesPanelSortStrategy)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/migration-guides/migrating-to-v10.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
