This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/release-notes/2018-2.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. 2018.2 release notes

PSPDFKit for Web 2018.2 migration insights

RSS

PSPDFKit for Web 2018.2 adds support for Electron, improved APIs, localization for 27 languages, and much more.

If you’re maintaining a Server installation, make sure to check out the 2018.2 server migration guide.

Render bitmaps

This version deprecates the Instance#renderCover API method in favor of Instance#renderPageAsArrayBuffer, which now works on server deployments too.

In contrast to renderCover, the new method expects a mandatory pageIndex as its second argument.

To migrate, replace any occurrence of renderCover with Instance#renderPageAsArrayBuffer, and make sure to pass 0 as the pageIndex in the place where you were previously omitting the second argument:

const buffer = await instance.renderCover({ width: 400 });
// becomes
const buffer = await instance.renderPageAsArrayBuffer({ width: 400 }, 0);
const buffer = await instance.renderCover({ width: 400 }, 2);
// becomes
const buffer = await instance.renderPageAsArrayBuffer({ width: 400 }, 2);

PSPDFKit for Web 2018.2 also introduces Instance#renderPageAsImageURL, which renders a page and returns a URL to the generated image. This method works on standalone and server-based deployments.

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