Electron
PSPDFKit for Electron

Add PDF Support to Your Electron Apps

Deliver a great cross-platform PDF experience on macOS, Windows, and Linux.

Download Trial

Drop-In Support for Advanced PDF Features

Powerful Features

Fast rendering, easy navigation, and intuitive annotation tools.

Explore Features

Cross-platform

Optimized for a great experience across macOS, Windows, and Linux.

Learn More

Easy to Integrate

Integrate with just a few lines of code. Customize with an extensive API.

View Examples


PSPDFKit for Electron - PDF Viewing Feature

PDF Viewing

A fast and smooth viewing experience — even with large documents. Supports both single- and double-page layouts and page rotation. Intuitive document navigation via scrolling, pagination, pan, and zoom.


PSPDFKit for Electron - Forms Feature

Forms

Full support for PDF AcroForms, so your users can view, fill out, and submit forms with ease.


PSPDFKit for Electron - Highlight Text Feature

Highlight Text

Easily mark up text on a document via an intuitive highlight menu with support for highlighting, strikethrough, and underlining.


PSPDFKit for Electron - Freehand Drawing Feature

Freehand Drawing

Draw anywhere on a document. Move and resize, and change appearance — including color, thickness, and opacity.


PSPDFKit for Electron - Text Annotation Feature

Text Annotation

Add text anywhere on a document. Move and resize, and change appearance – including font, size, alignment, and color.


PSPDFKit for Electron - Note Annotation Feature

Note Annotation

Add longer comments, which can be collapsed or expanded, to a document. Change appearance with a variety of shapes and colors.


PSPDFKit for Electron - Search Feature

Search

Quickly search documents with a fluid and fast search experience, including intuitive keyboard shortcuts for power users.


PSPDFKit for Electron - Thumbnail Sidebar Feature

Thumbnail Sidebar

Get a quick overview of all pages in a document. Show and hide at any time, resize, or expand into a full gallery view.


PSPDFKit for Electron - Localization Feature

Localization

Built-in support for 27 languages, with the ability to add and customize localization and change locale at runtime.


PSPDFKit for Electron - Printing Feature

Printing

Print and export documents, including all annotations. Use the system print dialog to allow for full control of the output.


PSPDFKit for Electron runs on macOS, Windows, and Linux

Cross-platform

PSPDFKit for Electron is optimized for a great experience across macOS, Windows, and Linux. It offers the best of both worlds: the speed and stability of our C++ PSPDFKit Core running natively, and the flexibility and features of our Web SDK UI.


PSPDFKit is trusted by some of the world’s leading companies
Atlassian
Docusign
Sap
Dropbox
Mercedes-benz
Evernote

Integration

Using PSPDFKit

PSPDFKit can be integrated with just a few lines of code,<
and it comes with a rich API, which allows for complete customization.

Copy
1
2
3
4
5
6
7
8
9
import PSPDFKit from "pspdfkit";

const instance = await PSPDFKit.load({
  container: "#pspdfkit",
  pdf: "<pdf-file-path>",
  licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
});

console.log("PSPDFKit for Web loaded", instance);
Copy
1
2
3
4
5
6
7
8
9
10
11
var PSPDFKit = require("pspdfkit");

PSPDFKit.load({
  container: "#pspdfkit",
  pdf: "<pdf-file-path>",
  licenseKey: "YOUR_LICENSE_KEY_GOES_HERE"
}).then(function(instance) {
  console.log("PSPDFKit for Web loaded", instance);
}).catch(function(error) {
  console.error(error.message);
});
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import PSPDFKit from "pspdfkit";

const toolbarItems = PSPDFKit.defaultToolbarItems;
toolbarItems.reverse();
toolbarItems.push({
  type: "custom",
  id: "cat",
  icon: "https://example.com/icons/cat.svg",
  mediaQueries: ["(min-width: 480px)"],
  onPress: () => alert("meow"),
});

PSPDFKit.load({
  // ...
  toolbarItems
});
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var PSPDFKit = require("pspdfkit");

var toolbarItems = PSPDFKit.defaultToolbarItems;
toolbarItems.reverse();
toolbarItems.push({
  type: "custom",
  id: "cat",
  icon: "https://example.com/icons/cat.svg",
  mediaQueries: ["(min-width: 480px)"],
  onPress: function () {
    alert("meow");
  },
});

PSPDFKit.load({
  // ...
  toolbarItems: toolbarItems
});
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import PSPDFKit from "pspdfkit";

const { List, Rect } = PSPDFKit.Immutable;
const { DrawingPoint } = PSPDFKit.Geometry;
const { InkAnnotation } = PSPDFKit.Annotations;

PSPDFKit.load(configuration).then(async (instance) => {
  var annotation = new InkAnnotation({
    pageIndex: 0,
    boundingBox: new Rect({ width: 100, height: 100 }),
    lines: new List([
      new List([
        new DrawingPoint({ x: 0,   y: 0  }),
        new DrawingPoint({ x: 100, y: 100}),
      ])
    ])
  });

  const createdAnnotation = await instance.createAnnotation(annotation);
  console.log(createdAnnotation.id); // => "01BS964AM5Z01J9MKBK64F22BQ"
});
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var PSPDFKit = require("pspdfkit");

PSPDFKit.load(configuration).then(function(instance) {
  var annotation = new PSPDFKit.Annotations.InkAnnotation({
    pageIndex: 0,
    boundingBox: new PSPDFKit.Geometry.Rect({ width: 100, height: 100 }),
    lines: new PSPDFKit.Immutable.List([
      new PSPDFKit.Immutable.List([
        new PSPDFKit.Geometry.DrawingPoint({ x: 0,   y: 0  }),
        new PSPDFKit.Geometry.DrawingPoint({ x: 100, y: 100}),
      ])
    ])
  });

  instance.createAnnotation(annotation).then(function(createdAnnotation) {
    console.log(createdAnnotation.id); // => "01BS964AM5Z01J9MKBK64F22BQ"
  });
});

Check out our example project, guides and API docs for more details.

Free 60-Day Trial

Download PSPDFKit for Electron and try it in your app today.

Electron