Drop a PowerPoint file and get it back as a design document in the Polotno design schema: one page per slide, and every text box, shape, picture and table as its own element with a position, a size and a style. The slides open in the live editor below the JSON, next to the list of what the import could not reproduce exactly.
The output shape
The JSON has a top-level width / height in pixels at 96 dpi, taken from the slide size, a fonts array, and a pages array. Each page has a children array of typed elements:
type: "text": text boxes with their runs, paragraphs and bullets, font family, size, colour and alignment.type: "figure"andtype: "line": basic shapes and straight lines, with fill and stroke.type: "svg": every other shape, such as stars, arrows and freeform shapes, as vector artwork.type: "image": pictures, inlined as data URLs.type: "table": tables with their cells, borders and cell text.type: "group": grouped shapes, and charts drawn as shapes and text.
The shapes of the slide master and layout are copied onto every page, behind the slide's own shapes. A hidden slide is imported too, and its page is marked as hidden in its custom field.
Import warnings
PowerPoint can draw things a browser canvas cannot draw the same way. The import still succeeds, and each difference is reported: the panel above the editor lists every warning with its code and page. The codes cover substituted fonts, unusable embedded fonts, unsupported text, fill and shape features, pictures in formats such as EMF or WMF, linked media, and objects that import as a placeholder. The full list is in the PPTX import docs.
What is not imported
- Animations, transitions and speaker notes.
- Text outlines, highlights, underline colours, custom tab stops and WordArt warps. Custom bullet glyphs draw as a disc.
- Chart types other than 2-D bar, column, line, area, scatter, pie and doughnut: these import as their fallback picture or a placeholder.
- Legacy
.pptfiles and password-protected decks, which are rejected.
The same conversion in code
import { pptxToJson } from "@polotno/pptx-import";
const json = await pptxToJson({
pptx: await file.arrayBuffer(),
onWarning: (w) => console.warn(w.code, w.message, w.details),
});
// json is a Polotno design - load into a store, edit, re-export
import { createStore } from "polotno/model/store";
const store = createStore({ key: "YOUR_KEY" });
store.loadJSON(json);Full API reference: PPTX Import docs. The output follows the Polotno design format.
