Internet Explorer 11

PSPDFKit for Web also supports Internet Explorer 11. Since this browser does not support ES2015, this guide covers some caveats for adding full Internet Explorer 11 support.

PSPDFKit for Web Standalone Caveats

The Standalone version of PSPDFKit for Web requires a large amount of memory and can trigger out of memory issues on IE 11, as memory management in that browser is unreliable. Closing/reopening the tab is a workaround; however, if support for IE 11 is important to you, we suggest using the Server-backed version of PSPDFKit for Web.

Don’t Rely on Arrow Functions

Arrow functions are a relatively new addition to the JavaScript language. Please make sure you don’t use arrow functions in your PSPDFKit integration code without transpiling them to proper ES5.

Consider the following example:

Copy
1
2
3
4
5
6
7
PSPDFKit.load(configuration)
  .then(instance => {
    instance.setViewState(viewState => viewState.set("currentPageIndex", 1));
  })
  .catch(error => {
    console.error(error.message);
  });

This should be written with non-arrow functions, like this:

Copy
1
2
3
4
5
6
7
8
9
PSPDFKit.load(configuration)
  .then(function(instance) {
    instance.setViewState(function(viewState) {
      return viewState.set("currentPageIndex", 1);
    });
  })
  .catch(function(error) {
    console.error(error.message);
  });

Be aware that single-line arrow functions (without curly braces) return the value of their expression. This means that it might be necessary to add a return as well (as you can see with the callback of Instance#setViewState in our example above).

Customizing the Appearance

PSPDFKit for Web comes with support for selecting your theme, but it is not available in IE 11 due to its lack of support for CSS custom properties, which are needed for our themes feature. However, you can add your own custom stylesheets, as explained in our CSS Customization guide.

User Experience Issues

When copying multiline text, IE11 will consider the entire text to be a single line, and it will be inserted as such anywhere it’s pasted. To improve this behavior, PSPDFKit for Web replaces the default copy command behavior with a custom listener that replaces the clipboard content with lines separated with newline characters so that the text is pasted in separate lines.

However, this approach may sometimes trigger the permissions dialog in the browser, depending on the security settings of the user.

If the user denies the permission, multiline text will be copied and pasted without separation between lines.