Drop an InDesign file and get it back as a design document in the Polotno design schema: one page per InDesign page, and every text frame, shape, picture and table as its own element with a position, a size and a style. The pages 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 first page, a fonts array, and a pages array. Each page has a children array of typed elements: text, pictures, shapes, lines, tables and groups. A story threaded through several frames becomes one text element per frame. Hidden layers, non-printing layers and hidden items are left out.
Every element carries custom.idml with the InDesign id and object type it came from, so you can map a design element back to the source document. Master page items are copied onto each page that uses the master and are marked in the same field.
Links and fonts come from the package
An .idml contains neither its linked pictures nor its fonts. Dropped alone, pictures use the preview InDesign stored in the file, or a grey placeholder, and each case is reported as a warning. Drop a .zip of the folder that File > Package writes and the converter resolves each link by file name from Links and reads the fonts in Document fonts. Placed PDF, Illustrator and Photoshop files are converted into editable elements in a group.
Import warnings
The import succeeds even when InDesign uses something a browser canvas cannot draw the same way, and each difference is reported. The panel above the editor lists every warning with its code. The codes cover substituted and unreadable fonts, overset text, missing and unsupported graphics, and text, shape, effect and object features that were approximated. The full list is in the IDML import docs.
The same conversion in code
import { idmlToJson } from "@polotno/idml-import";
const json = await idmlToJson({
idml: await file.arrayBuffer(),
fonts: documentFontFiles, // the package's "Document fonts" folder
resolveLink: async ({ name }) => linksFolder.get(name) ?? null,
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: IDML Import docs. The output follows the Polotno design format.
