2023.1 Migration Guide

PSPDFKit for Web 2023.1 introduces some new APIs and includes several bug fixes. To determine if you need to take action, check your implementation and the information below.

Notable Changes

  • (#37692) Widget annotations for signature form fields will be rendered using their appearance stream if the license includes either the Digital Signatures or the Electronic Signatures component, regardless of the form field being signed or not, and regardless of the returned value of an eventual isAPStreamrendered() callback when present in the provided configuration.

Previously, only digitally signed form fields would be rendered using their appearance stream, and only when the license included the Digital Signatures license component.

It’s not possible to restore the previous behavior, but if you need it for your use case, please contact our support platform and we’ll try to help you.

  • (#38366) Microsoft Edge 18 will no longer be supported starting in PSPDFKit for Web 2023.2.0.

  • (#37778) Instant JSON annotation version 1 is now deprecated. It’ll still work, but exporting Instant JSON will now return v: 2.

  • (#37778) The text property of PSPDFKit.Annotations.TextAnnotation is now an object with the following signature:

type Text = {
  format: "xhtml" | "plain",
  value: string
};

Text annotations now support both plain and rich text formats. You can read more about rich text annotations in our guide.

Before

const textAnnotation = new PSPDFKit.Annotations.TextAnnotation({
  ...otherProperties,
  text: "Hello world!"
});

After

const textAnnotation = new PSPDFKit.Annotations.TextAnnotation({
  ...otherProperties,
  text: {
    format: "plain",
    value: "Hello world!"
  }
});
type Text = {
  format: "plain",
  value: string
};

Before

const noteAnnotation = new PSPDFKit.Annotations.NoteAnnotation({
  ...otherProperties,
  text: "This is a note."
});

After

const noteAnnotation = new PSPDFKit.Annotations.NoteAnnotation({
  ...otherProperties,
  text: {
    format: "plain",
    value: "This is a note."
  }
});
  • (#37778) The text property of PSPDFKit.Comment is now an object with the following signature:

type Text = {
  format: "xhtml",
  value: string
};

All comments now support rich text, and the format is always xhtml. You can read more about this in our guide.

Before

const comment = new PSPDFKit.Comment({
  ...otherProperties,
  text: "This is a comment."
});

After

const comment = new PSPDFKit.Comment({
  ...otherProperties,
  text: {
    format: "xhtml",
    value: "This is a comment."
  }
});
  • (#38224) With PSPDFKit for Web 2023.1, grouping annotations is now possible; as a result, the Command-G keyboard shortcut will be changed to group selected annotations instead of triggering document search on macOS. However, you can still use Command-F as a workaround to trigger a document search.

  • (#38494) This is the last release of PSPDFKit for Web that still includes support for the PSPDFKit.Configuration.disableWebAssembly configuration property. As of this version, this option is officially deprecated, and running PSPDFKit for Web 2023.1 with the option enabled will show a warning. From version 2023.2.0, PSPDFKit.Configuration.disableWebAssembly configuration option support will end.

  • (#38593) With PSPDFKit for Web 2023.1, the default value of the PSPDFKit.Options.BREAKPOINT_MD_TOOLBAR changed from 1040px to 1070px. If you want to change its value, you must do so before the first time you load a PSPDFKit instance:

PSPDFKit.Options.BREAKPOINT_MD_TOOLBAR = 1050;
PSPDFKit.load();

Migrate PSPDFKit Server

For information on PSPDFKit Server migration, see PSPDFKit Server 2023.1 Migration Guide.

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