Polotno

Polotno SDK

A PDF SDK built on a design schema, not a viewer

Parse a PDF into editable text, images, and vector paths. Edit it on a canvas, generate new documents from data, and export vector PDF, CMYK, or PDF/X.

60 days free trial on dev server

Most PDF SDKs are built around a viewer, with editing bolted on top. Polotno parses the document into a schema first, which is why the same canvas that edits an image can edit a PDF.

Editable layers, not a bitmap

Text stays text, images stay images, vector artwork stays paths. Every element carries explicit position, font, and colour.

One template, many documents

Fill a stored template from a database row and render it thousands of times with identical layout.

Runs where your data lives

Parse and render in the browser, on your own servers, or through the Cloud Render API.

How a PDF round-trips

Three steps, all available in the browser and under Node. Nothing is uploaded unless you choose server-side rendering.

01

Parse

@polotno/pdf-import turns the document into typed elements — text with font and colour, images with crop regions, vectors as paths, each with explicit coordinates.

02

Edit

Change anything through the same API the editor UI uses. Swap copy, recolour, delete pages, inject data, or apply a template — headlessly or with a canvas in front of a user.

03

Export

@polotno/pdf-export writes a vector PDF with selectable text, or a print-ready CMYK / PDF-X file. The built-in store.saveAsPDF() is the raster path when you want pixel parity instead.

pdf-round-trip.ts
import { pdfToJson } from "@polotno/pdf-import";
import { jsonToPDFBlob } from "@polotno/pdf-export/browser";
import { createStore } from "polotno/model/store";

// 1. Parse — text, images, and vector paths come back as typed elements
const json = await pdfToJson({ pdf: await file.arrayBuffer() });

const store = createStore({ key: "YOUR_KEY" });
store.loadJSON(json);
await store.waitLoading();

// 2. Edit — programmatically, or hand the store to the editor UI
store.pages[0].children
  .filter((el) => el.type === "text" && el.text.includes("{{name}}"))
  .forEach((el) => el.set({ text: el.text.replace("{{name}}", customer) }));

// 3. Export — vector PDF, text still selectable
const blob = await jsonToPDFBlob(store.toJSON());

What goes in, what comes out

The same design schema sits in the middle of every conversion, which is why layout survives the trip.

Import

PDF (text, images, vector paths)
Adobe Illustrator (.ai)
Photoshop (.psd)
SVG
Figma designs
Polotno JSON

Export

Vector PDF with selectable text (@polotno/pdf-export)
Print-ready CMYK, spot colours, bleed
PDF/X-1a and PDF/X-4
PNG and JPG at native resolution
SVG, one file per page
Self-contained HTML
PPTX slides
Structured JSON

Where the work runs

Identical schema, identical output. Pick per workload rather than per product.

In the browser

Parsing and rendering both run client-side. The file never leaves the user's machine, which matters when the documents are invoices, contracts, and statements. Encrypted PDFs are unlocked locally.

On your own servers

The same packages run under Node. Right when you need deterministic output, handle regulated data, or want render throughput that does not depend on user hardware.

Through the Cloud Render API

POST the design JSON and get a rendered file back at $0.004 per image. No render fleet to operate, no browser pool to keep warm.

Common questions

Q: Is this a PDF viewer?

No. Polotno is an editor. There is no annotation, comment, or highlight layer, and no read-only viewer component. If your product needs users to review and mark up documents rather than change them, a viewer-first SDK is the right choice.

Q: What happens with a scanned PDF?

A scan has no text layer, so the parser returns image elements and nothing to edit as text. Run OCR first with a dedicated tool, then import the text-augmented file. There is no OCR built in.

Q: Are form fields supported?

No. AcroForm widgets are not parsed as interactive fields. Filling or flattening an existing form is outside what the SDK does.

Q: Can I redact a document?

You can delete an element, which removes it from the design and from the exported file. That is an editing operation, not a certified redaction, and it should not be relied on for a legal or compliance workflow.

Q: Does the exported PDF keep selectable text?

It depends which path you use. @polotno/pdf-export is vector — fonts are embedded as subsets, text stays selectable and searchable, and shapes stay paths. The built-in store.saveAsPDF() is raster and flattens each page to an image. Pick vector unless you specifically need pixel parity with the editor canvas.

Q: Which languages are supported?

Polotno is a JavaScript and TypeScript SDK. It runs in the browser and under Node. There are no native Java, .NET, or Python bindings.

Q: Can it compress an existing PDF?

No. Re-rendering a document through the design schema is not a file-size optimisation pass and should not be treated as one.

Q: Do the tools upload my files?

No. Every converter on the site parses and renders in your browser. You can watch it work with the network tab open.

Embed PDF editing in your product this week.

TRUSTED BY

100,000+

CREATORS

300+

BUSINESSES

ExpediaUnbounceLovePopPostGridPredis.ai