This release adds three features to Polotno SDK: PowerPoint import, a renderer for still images that runs in Node.js with no headless browser, and a Lottie element.
| Feature | Package | Docs |
|---|---|---|
| PPTX import | @polotno/pptx-import | PPTX import |
| Image export without a headless browser | @polotno/image-export | Image export |
| Lottie element | polotno | Lottie |
PPTX import
@polotno/pptx-import converts a PowerPoint .pptx file into Polotno JSON. It runs in the browser and in Node.js 22.13 or newer.
import { pptxToJson } from '@polotno/pptx-import';
const json = await pptxToJson({ pptx: await file.arrayBuffer() });
store.loadJSON(json);What you get:
- One page per slide, at the slide's size.
- Shapes, text boxes, pictures, tables and 2-D charts as separate, editable elements. Slides are never flattened to an image.
- Master and layout shapes copied onto each page.
- Fonts matched to Google Fonts, to fonts the deck embeds, or to substitutes with matching metrics. Each substitution is reported.
- Warnings for features the import approximated or dropped. Page-specific warnings include the slide index; deck-wide warnings have no slide index.
Limits:
- Animations, transitions and speaker notes are not imported.
- 2-D bar, column, line, area, scatter, pie and doughnut charts become editable shapes and text. Other chart types import as a picture or a placeholder.
- Text outlines, highlights, underline colours, custom tab stops and WordArt warps are dropped.
- Legacy
.pptfiles and password-protected files are rejected with an error. - There is no built-in size limit, so a server that accepts public uploads caps its input itself.
Round-trip works, with limits. Import a deck, edit it, and write it back with @polotno/pptx-export. Text, tables and simple shapes stay editable in PowerPoint. Unsupported shapes and non-text gradient fills become pictures. Gradient text stays editable but uses the first gradient stop as a solid color. The exported file embeds no fonts.
Docs: PPTX import.
Image export without a headless browser
@polotno/image-export renders a page of Polotno JSON to PNG or JPEG in Node.js and in the browser. It draws the same canvas scene the editor builds. The Node.js version does not install or launch a browser; the browser version uses the browser's canvas API.
import { jsonToImage } from '@polotno/image-export';
await jsonToImage(json, 'page.png', { key: 'YOUR_API_KEY' });The root import selects the runtime's build. This call saves a file in Node.js and downloads it in the browser.
Measured by Polotno against polotno-node, which drives headless Chromium:
| Measure | @polotno/image-export compared with polotno-node |
|---|---|
| Render time, photo templates | 2–5× faster |
| Render time, simple layouts | About 15× faster |
| Peak memory | 280 MB, against 700 MB |
Limits:
- On a server, Node.js 22.13 or newer. Browser rendering uses the browser entrypoint.
- The render needs outbound network access. It downloads the design's images, SVGs and fonts.
- Output is PNG or JPEG, one page per call.
- Video frames are not drawn. A video element draws its border only, with a warning.
- Lottie elements are left out, with a warning.
polotno-node remains the self-hosted renderer for PDF, GIF and MP4, and for designs whose video or Lottie elements must appear in the output. The Cloud Render API covers the same formats with no servers to run.
Docs: Image export and Server-side rendering with Node.js, which compares the two packages.
Lottie element
A lottie element plays a Lottie animation on the canvas. Its source is a .json Lottie or a .lottie file.
store.activePage.addElement({
type: 'lottie',
src: 'https://example.com/animation.lottie',
width: 300,
height: 300,
});Where it renders:
- In the editor and its preview.
- In GIF and MP4 export in the browser.
- On your servers through
polotno-node. - In the Cloud Render API, in MP4 and GIF output.
Limits:
@polotno/image-exportdoes not draw it.- The element has no duration of its own. The animation loops from the moment the element enters the timeline.
Docs: Lottie and the element API.
For AI agents
An agent writes Polotno JSON with the help of the Polotno skills, and @polotno/image-export, polotno-node or the Cloud Render API renders it. Polotno SDK has no MCP server that renders designs. Polotno for AI agents describes the path.
Upgrade
The Lottie element ships in the polotno package. The importer and the image renderer are separate packages, so you install only what you use.
npm install @polotno/pptx-import @polotno/image-exportThe full list of changes is in the changelog.
