New features in the 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
defaultToolbarItemsto show/hide the thumbnail sidebar,sidebar-thumbnails. When it is clicked, it will update theViewState. - The
ViewStatehas new properties:ViewState#sidebarModeto toggle the visibility of the sidebar.ViewState#pagesRotationto control the rotation of all pages. The value must be a multiple of 90 degrees. The helper methodsViewState#rotateLeft()andViewState#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#XFDFandConfiguration#XFDFKeepCurrentAnnotations). For server setups, this is part of the Server API. - When loading a WebAssembly instance, support for IndexedDB caching(opens in a new tab) and streaming instantiation(opens in a new tab) 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.wasmartifact. 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 returnsContent-Type=application/wasm.
For a full list of changes, check out the changelog.