Licenses

A license lets you run the engine yourself. It is a small signed file, checked offline by the engine: no activation, no account to reach, nothing sent anywhere.

What a license covers

  • The builds in your quote. WASM for the browser, WASM for the server, Native Linux, or any combination.
  • Your whole organisation. Every server, development machine and CI job, with no per-machine or per-document fee.
  • One year, with updates. Every build released before the license expires works with it. It renews each year at 50% off.
  • Your documents are yours. Generate documents for your own operations and for your customers, and distribute them freely.

The hosted API needs no license: an API key is enough. To buy a license, request a quote from your dashboard. We send an offer to your account; once it is paid, the dashboard shows the included builds and license keys. See pricing.

There are two kinds of license file. Which one you use depends on where the engine runs:

Where the engine runsLicenseToken
Your servers and CI, with the native binaryStandardPAL1-…
Your servers, with WebAssembly: Node.js, Bun, Cloudflare WorkersStandardPAL1-…
A desktop or mobile app that you publishStandardPAL1-…
A website, in your users' browsersDomain-bound, for the domains you declarePAL2-…

You may ship the engine inside the desktop and mobile apps you publish, with your standard license. A website is different: anyone can copy what a page loads, so you declare its domains to us and publish only the domain-bound license issued for them. This is a condition of the license, not an option: see where you may run the engine in the terms.

Reselling the engine itself, or offering it to others as a library or a conversion service, is not covered: contact us for a distribution agreement.

The license file

The standard license, as downloaded from the dashboard:

palatine-license.txt
Palatine license
Licensee: Northwind Books
License id: 6f1c2a9e-3b7d-4c58-9e21-0a4d5b8c7f13
Products: native, wasm
Issued: 2026-11-15T00:00:00.000Z
Expires: 2027-11-15T00:00:00.000Z
Domains: unrestricted
Grace period: 30 days

PAL1-AQMAAAAAaRfC…
  • Only the last line counts. The token carries the products, the dates, the license identifier and a signature. The lines above describe it for humans; editing them changes nothing.
  • It is verified offline. The engine checks the signature with a public key built into it. It never contacts a server, so it works in closed networks and on devices without a connection.
  • A standard license is a secret. It works anywhere, for anyone who holds it. Keep it out of public repositories and public web pages; store it like an API key.

Supply the license

WebAssembly and Native only

Pass it when you create the renderer:

import { createRenderer } from "@palatine/renderer";
import { readFile } from "node:fs/promises";

// The whole file, or the PAL1-… token alone.
const renderer = await createRenderer({
  license: await readFile("palatine-license.txt", "utf8"),
});

Or set PALATINE_LICENSE, read when license is omitted in runtimes that have an environment (Node.js, Bun):

terminal
# The token, or the text of the file. Not a path.
export PALATINE_LICENSE="$(cat palatine-license.txt)"
import { createRenderer, renderPDF } from "@palatine/renderer";

const renderer = await createRenderer(); // reads PALATINE_LICENSE
const pdf = await renderPDF({ html, fonts }); // so do the top-level functions

With a Web Worker, pass it to createWorkerRenderer(worker, { license }). In a Cloudflare Worker, store it as a secret and pass env.PALATINE_LICENSE. A renderer keeps the license it was created with: after a renewal, create a new one.

Domain authorization

Everything a web page loads is public, the license included. A standard license copied from your page would work on anyone else's site. For browsers, we issue a domain-bound license instead: its token lists the domains and their subdomains where it is valid. The engine refuses to render outside those domains. You can ship it in your JavaScript bundle.

palatine-license.txt
Palatine license
Licensee: Northwind Books
License id: 6f1c2a9e-3b7d-4c58-9e21-0a4d5b8c7f13
Products: wasm
Issued: 2026-11-15T00:00:00.000Z
Expires: 2027-11-15T00:00:00.000Z
Domains: northwind.example, app.northwind.example
Grace period: 30 days

PAL2-AgIAAAAAaRfC…
main.ts
import { createWorkerRenderer } from "@palatine/renderer/browser";

const worker = new Worker(
  new URL("@palatine/renderer/worker", import.meta.url),
  { type: "module" },
);

// Shipped in your bundle, readable by anyone, and useless outside your domains.
const palatine = createWorkerRenderer(worker, {
  license: "PAL2-AgIAAAAAaRfC…",
});

How the check works

  • The list is signed. The hostnames are part of the signed token. Adding a domain to the text of the file does nothing.
  • The engine compares the page's hostname. At each render it reads the origin of the page, or of the Web Worker, that runs it, and checks whether its hostname falls under a domain in the list. The origin must be http or https; the port and the path do not matter.
  • Subdomains are included. northwind.example covers northwind.example, www.northwind.example and preview.app.northwind.example. Single-label names such as localhost match exactly. Older builds require exact hostnames.
  • It is about where the engine runs, not about the document. The URLs of images, the baseURL and the links inside the document play no part.
  • It stays offline. The check reads the browser's own location. No request is made to us, and your users' documents never leave their device.

Where a domain-bound license works

ContextResult
A page served over http(s) from a listed domain or one of its subdomainsRenders
A Web Worker started by such a page, blob workers includedRenders
Any unrelated hostnameRefused
A page without a web origin: file://, a sandboxed frame, an app's local pageRefused
Node.js, Bun, Cloudflare Workers, the native binaryRefused: use the standard license

A refused render throws This Palatine license requires an authorized browser domain. A domain-bound license covers the WebAssembly build only.

Getting one

Select WASM (browser) in your quote request and enter the domains in the Browser domains field. After you pay the quote, download the domain-bound key from your dashboard. To update the domains, contact us. You can enter up to 8 hostnames in the request. Contact us if you need more.

  • List the domains you operate. A declared domain includes all its subdomains, including staging and preview hosts.
  • International domain names are stored in their ASCII form; uppercase and a trailing dot are normalized.
  • For development, ask for a separate license that lists localhost, and keep it private. Do not add localhost to the license you publish: anyone who copies it could then run the engine locally. Open your dev server as http://localhost:…, since 127.0.0.1 cannot be listed.

Expiry and renewal

MomentWhat the engine does
Until the expiry dateRenders normally.
For 30 days after itRenders, and reports a license-expired warning at each render.
After the grace periodRefuses to render until a valid license is supplied.

The grace warning names the day rendering stops:

Palatine license expired on 2027-11-15; rendering stops in 12 days (2027-12-15). Renew it at https://palatine.page

The package passes it to onWarning, or to console.warn when there is no handler; the binary prints it on its error output. Watch for it in your logs.

  • Renewal changes the file, not the engine. The license is a yearly subscription. After each renewal, download the new palatine-license.txt from your dashboard and replace the old one. The build you have deployed accepts it as is.
  • Updates follow the license. A license runs every build released before its expiry date. A build released after it refuses that license, so renew before you upgrade the engine. The dashboard always offers the newest build your license can run.
  • Cancelling takes effect at the end of the paid year: the current license keeps working until its expiry date and through the grace period.
  • The clock matters. The dates are compared with the machine's clock. A clock set more than a day before the build or the license was issued is refused: check the time in containers and virtual machines.

Troubleshooting

A license problem stops the render: the package throws an Error, the binary exits with status 1. The message says which case it is.

MessageCause and fix
No Palatine license: set PALATINE_LICENSE or pass --license…No license reached the engine. Check the option, the flag or the environment variable. In the package, the variable holds the token or the file's text, not a path.
Malformed Palatine license tokenThe token is truncated or altered. Download the file again and pass it whole.
Invalid Palatine license signatureThe token was modified, or belongs to another product. Download the file again.
This Palatine license does not cover the native rendererA WebAssembly-only license, such as a domain-bound one, given to the binary. Use the standard license.
This Palatine license requires an authorized browser domainA domain-bound license used on a hostname it does not list, or outside a browser. See where it works.
This Palatine build was released after your license expired…The build is newer than the license allows. Renew, or keep the earlier build.
The system clock is earlier than this Palatine build or licenseThe machine's date is wrong. Correct it.
Palatine license expired on …; rendering stops in … daysA warning during the grace period. Download the renewed file and replace the old one.
Palatine license expired on …The grace period is over. Renew from Billing & invoices in the dashboard, then replace the file.

Still stuck? Contact us with the message and your license identifier, never the token.