Skip to content

How to apply PdfJsKit license key

GleamTech edited this page Oct 19, 2024 · 1 revision

The evaluation version is the same as the purchased one – the trial version simply becomes licensed when you apply the license. If not set, you will see license reminder every time you load a document.

When you purchase a license, you will receive a license info (JSON). You should set license option to this JSON object when you initialize a PdfViewer instance:

import PdfViewer from "pdfjskit";

var pdfViewer = new PdfViewer({
  documentUrl: "pdfjskit/sample.pdf",
  width: "80%",
  height: 720,
  resizable: true,
  language: "en-US",
  theme: "slate, classic-dark",

  license: {
    "key": "42U44-A8W3U-0TG5A-66C4F-3AA0E-776A0",
    "owner": "*.example.com",
    "date": "2024-09-01",
    "product": "PdfJSKit",
    "type": "Professional",
    "version": "1.0"
  }
});

pdfViewer.render(document.getElementById("container"));
Clone this wiki locally