2023.5 Migration Guide
PSPDFKit for Web 2023.5 introduces some new APIs and includes several bug fixes. To determine if you need to take action, check your implementation and refer to the information below.
Notable Changes
The following sections outline notable changes in PSPDFKit for Web 2023.5.
Fix Widget Annotation Rendered behind Other Annotation Types
This version solves a longstanding issue where widget annotations could be rendered behind (or below, in z-order terms) other annotation types, which is incorrect behavior from both an accessibility and a security point of view. Only image and ink annotations can be rendered above signature form fields, as they’re themselves considered signatures.
This change can technically be considered a bug fix. However, you may have relied on this longstanding buggy behavior in your application. So, to adapt to these changes, we recommend replacing any presentational widget annotations that you may have preferred to be rendered in the background with another equivalent annotation type.
Widget Annotation’s lineHeightFactor Default Value Is Now null
The default value for widget annotation’s lineHeightFactor
property has changed from 1
to null
. If you want to keep the old default value, you can explicitly set it to 1
in the annotations.create
event listener callback:
instance.addEventListener( "annotations.create", function (annotations, pageNumber) { annotations.forEach(function (annotation) { if ( annotation instanceof PSPDFKit.Annotations.WidgetAnnotation && annotation.lineHeightFactor === null ) { instance.update(annotation.set("lineHeightFactor", 1)); } }); } );
New Faster Processing Engine
This version ships with a new, faster processing engine for document conversion. This engine is enabled by default, but you can switch back to the slower, smaller engine by setting processorEngine: PSPDFKit.ProcessorEngine.smallerSize
in the configuration object passed to PSPDFKit.load()
:
PSPDFKit.load({ processorEngine: PSPDFKit.ProcessorEngine.smallerSize });
Migrate PSPDFKit Server
For information on PSPDFKit Server migration, see PSPDFKit Server 2023.5 Migration Guide.
For a full list of changes, check out the changelog.