Electron PDF SDK

Electron is an open source framework that allows development of cross-platform desktop GUI applications with JavaScript, HTML, and CSS. It is developed by GitHub and was formerly known as Atom Shell.

PSPDFKit as an Electron PDF SDK

PSPDFKit for Electron uses the standalone deployment of PSPDFKit for Web under the hood and works with Electron applications on all platforms (Windows, macOS, and Linux). We use WebAssembly to deliver fast rendering performance with low memory overhead.

WebAssembly logo

Application Architecture

We designed PSPDFKit for Electron to run in your renderer process. This allows you to be in full control of your BrowserWindow while only requiring a simple HTML element as the mount target for PSPDFKit.

Using PSPDFKit for Electron in the main process will not work.


PSPDFKit for Electron will automatically load all required artifacts for you. In order for this to be possible, we require (at least) fetch access for the file URL scheme. This can be activated via JavaScript inside your renderer process:

const { protocol } = require("electron");
    scheme: "file",
    privileges: {
      secure: true,
      standard: true

If you want to further restrict the privileges for the file URL scheme, please keep in mind that we only require the supportFetchAPI option to be set to true. Additionally, we recommend you set up a custom Content Security Policy (CSP), as noted in the Electron documentation.

PSPDFKit for Electron will parse the PDF file locally using our WebAssembly renderer. No PDF file will ever be sent via the network.