Search Docs
Loading...
Skip to content

From InDesign

Load a CE.SDK archive converted from an Adobe InDesign IDML file into your Android app, then continue editing the imported design.

4 mins
estimated time
GitHub

Android does not parse IDML files. Convert the IDML into a self-contained .cesdk archive in a browser or Node.js environment, then deliver that archive to the app through your backend, app storage, or a user-selected document. For server-side conversion, use the Node.js importer.

Conversion Prerequisite#

Load the Converted Archive#

Convert the IDML once with @imgly/idml-importer in a browser or Node.js environment, save the resulting .cesdk archive, and make its Uri available to Android. The archive bundles the converted scene with its embedded assets, so loadArchive() can replace the active scene without Android reading the original IDML file.

val scene = engine.scene.loadArchive(
archiveUri = archiveUri,
waitForResources = true,
)

Pass a local file URI, a readable Android content URI, or a remote HTTPS URI. waitForResources=true resumes the coroutine after the archive’s bundled resources are ready for editing or export.

Verify the Import#

Confirm that the loaded scene contains pages before showing it in your app. An empty page list means the converted archive has no usable design pages.

check(engine.scene.getPages().isNotEmpty()) {
"The converted InDesign archive contains no pages."
}

Fit the Scene to the Viewport#

Frame the loaded scene after the archive is ready. The padding values are screen pixels around the focused scene.

engine.scene.zoomToBlock(
block = scene,
paddingLeft = 40F,
paddingTop = 40F,
paddingRight = 40F,
paddingBottom = 40F,
)

What Gets Imported#

The conversion can preserve element grouping, positioning, rotation, transparency, text with bold and italic styling, shapes, solid and gradient fills, strokes, and embedded images. Android receives the converted scene in the archive and can edit it like any other CE.SDK scene.

Limitations#

These conversion limits apply before the archive reaches Android:

  • Linked images become placeholders. Embed images in InDesign before exporting to IDML.
  • Text flow between multiple frames is not supported and may appear duplicated.
  • Image fitting can differ when images are shrunk inside their frames.
  • Embedded PDF or Adobe Illustrator content needs the embedded importer during conversion; otherwise it becomes a placeholder.
  • Unavailable fonts use fallbacks selected during conversion.
  • Complex text formatting beyond bold and italic may not be preserved.

API Reference#

Method Description
engine.scene.loadArchive(archiveUri=_, overrideEditorConfig=_, waitForResources=_) Load the converted archive and its bundled assets from a URI.
engine.scene.getPages() Return the pages in the active imported scene.
engine.scene.zoomToBlock(block=_, paddingLeft=_, paddingTop=_, paddingRight=_, paddingBottom=_) Fit the imported scene in the viewport with screen-pixel padding.

Next Steps#