2018.1 Migration Guide

PSPDFKit for Web 2018.1 adds support for a new thumbnail sidebar, page rotation, and XFDF export/import.

If you’re maintaining a Server installation, make sure to check out the 2018.1 Server Migration Guide.

Notable Changes

  • A new toolbar item was added to the defaultToolbarItems to show/hide the thumbnail sidebar, sidebar-thumbnails. When it is clicked, it will update the ViewState.
  • The ViewState has new properties:
    • ViewState#sidebarMode to toggle the visibility of the sidebar.
    • ViewState#pagesRotation to control the rotation of all pages. The value must be a multiple of 90 degrees. The helper methods ViewState#rotateLeft() and ViewState#rotateLeft() were added to quickly rotate by 90 degrees in one direction.
  • The existing Instance#exportInstantJSON() API is now also available on server deployments.
  • A new API was added to export XFDF: Instance#exportXFDF().
  • A new, standalone-exclusive API was added to import XFDF when loading a PDF (Configuration#XFDF and Configuration#XFDFKeepCurrentAnnotations). For server setups, this is part of the Server API.
  • When loading a WebAssembly instance, support for IndexedDB caching and streaming instantiation will now be detected. If the browser supports any of these techniques, we’ll use it to improve WebAssembly initialization time.
  • The new WebAssembly streaming instantiation will require a specific MIME type for the pspdfkit.wasm artifact. This needs to be configured by your web server if you’re not using PSPDFKit Server. Make sure that the response header for the WebAssembly request returns Content-Type=application/wasm.

For a full list of changes, check out the changelog.