Search Docs
Loading...
Skip to content

From InDesign

Bring Adobe InDesign designs into CE.SDK by converting IDML files to a scene archive on a server, then loading that archive into the engine.

4 mins
estimated time
GitHub

InDesign import is handled by the @imgly/idml-importer package, which parses IDML files and converts them into CE.SDK scenes. That package runs in Node.js and the browser — there is no on-device IDML parser. The recommended workflow is to convert IDML files to a portable .cesdk archive once with the Node.js importer, then ship or download that archive and load it with engine.scene.loadArchive(from:).

Load the Converted Archive#

Load the .cesdk archive produced by the conversion step with loadArchive(from:). Archives are ZIP files that bundle the scene together with its embedded assets, so the import is self-contained — the URL can point to a local file or a remote download.

try await engine.scene.loadArchive(from: archiveURL)

Verify the Import#

After loading, confirm the scene contains pages before presenting it. engine.scene.getPages() returns the imported pages; an empty result means the archive held no usable content.

let pages = try engine.scene.getPages()
print("Imported design has \(pages.count) page(s)")

Fit the Scene to the Viewport#

Retrieve the current scene with engine.scene.get() and frame it with engine.scene.zoom(to:). The four padding parameters add space in points around the focused block.

guard let scene = try engine.scene.get() else { return }
try await engine.scene.zoom(
to: scene,
paddingLeft: 40,
paddingTop: 40,
paddingRight: 40,
paddingBottom: 40,
)

What Gets Imported#

The conversion preserves element grouping, positioning, rotation, and transparency, along with text (bold and italic styles), shapes (rectangles, ovals, polygons, lines), solid and gradient fills, strokes, and embedded images. These are baked into the archive during conversion, so the imported scene is fully editable once loaded.

Limitations#

The same conversion limitations apply wherever you load the result:

  • Linked images become placeholders. Embed all images in InDesign before exporting to IDML.
  • Text flow between multiple frames is not supported and may appear duplicated.
  • Unavailable fonts are substituted with fallbacks. Configure font matching during conversion for the best results.
  • Complex text formatting beyond bold and italic may not be preserved.

API Reference#

Methods#

Method Description
engine.scene.loadArchive(from:) Load a scene and its bundled assets from a .cesdk archive URL
engine.scene.get() Return the current scene block, or nil if none is loaded
engine.scene.getPages() Return the pages of the current scene
engine.scene.zoom(to:paddingLeft:paddingTop:paddingRight:paddingBottom:) Fit a block in the viewport with padding in points

Next Steps#