Export your design as one layered PSD file per page for continued editing in Adobe Photoshop.
The independently released @imgly/psd-exporter package exports every page of the current scene in the browser. A PSD holds one canvas, so exportPsd() returns one file per page. The example packs the files into a ZIP and downloads it.
This guide covers the editor download workflow, page export, diagnostics, and the ZIP download. The same example also exports IDML; the IDML export guide covers that format and the download button.
Download PSD Files from the Editor#
The shared editor offers IDML (InDesign) and PSD (Photoshop) in the Export dropdown for the same design. Edit the sample before downloading; each export uses your current changes. Both formats are generated in the browser.
Select Export → PSD (Photoshop) to export for Photoshop. The Export dropdown is disabled while an export runs and shows which format is being exported. A notification indicates when content needs review. Check the exported documents in Photoshop.
Unzip design-psd.zip, then open page-1.psd, page-2.psd, and so on in Photoshop. Install the fonts of the design first so that editable text keeps its typeface.
Import the Exporter#
Install @imgly/psd-exporter alongside your CE.SDK installation. The exporter has its own release schedule and version number. The example also uses JSZip to pack the files into one download.
import CreativeEngine, { type Configuration } from '@cesdk/engine';import { exportPsd } from '@imgly/psd-exporter';import JSZip from 'jszip';Load a Design#
Load the scene and wait for its resources before exporting. The visible page is framed in the editor; the export includes all pages.
const engine = cesdk.engine;await engine.scene.loadFromArchiveURL( new URL('./assets/strategy-quote.imgly', import.meta.url).href, false, true);const page = engine.scene.getCurrentPage();if (page === null) throw new Error('The design has no page');await engine.scene.zoomToBlock(page, { padding: 40 });Export from a Second Engine#
The export changes the scene while it runs and restores it at the end. An editor on the same engine would show these changes, and an edit during the export could be lost. The example saves the current scene to an archive, loads it into a second engine with the editor’s configuration, and exports from there.
// The export changes the scene while it runs, so it works on a copy in a second engine.async function exportPsdFromCopy( engine: CreativeEngine, engineConfig: Partial<Configuration>) { const archiveUrl = URL.createObjectURL(await engine.scene.saveToArchive()); try { const exportEngine = await CreativeEngine.init(engineConfig); try { await exportEngine.scene.loadFromArchiveURL(archiveUrl); return await exportPsd(exportEngine); } finally { exportEngine.dispose(); } } finally { URL.revokeObjectURL(archiveUrl); }}Export Every Page#
The helper returns the result of exportPsd(). Its psds array contains { pageName, psd } entries in scene page order, where psd is a Uint8Array.
const { psds, logger } = await exportPsdFromCopy( engine, this.engineConfig);The export runs in the browser tab with a second engine and keeps every page’s PSD in memory until the download starts. Designs with many large pages need more memory.
Review Export Diagnostics#
Read the messages from logger.getMessages(). Each message includes a severity, code, and description of a conversion or unsupported feature. An info message records an expected conversion. A warning names content that needs review, such as text that became a pixel layer or a missing font. When any message is not info, the example logs the messages to the browser console and shows a warning notification.
const messages = logger.getMessages();const needsReview = messages.some( (message) => message.type !== 'info');if (needsReview) { console.warn('PSD export needs review:', messages);}Download the ZIP#
Add each PSD to a ZIP with an indexed filename. Indexed names keep pages distinct when their names repeat or contain characters that cannot be used in a filename. Generate the archive as a Blob and pass it to the example’s downloadFile() helper, which starts the download through a temporary link.
const zip = new JSZip();psds.forEach(({ psd }, index) => { zip.file(`page-${index + 1}.psd`, psd);});downloadFile( await zip.generateAsync({ type: 'blob' }), 'design-psd.zip');The files are named page-1.psd, page-2.psd, and so on. A single ZIP keeps the pages of a design together in one download.
Editability and Runtime Compatibility#
Supported layers and text remain editable. Features that PSD cannot reproduce as editable content, including some effects and warped text, may use raster fallback. Review the export diagnostics to identify those conversions. Fonts needed by editable text must be available in the receiving application. Difficult native text can also have a hidden approximate copy in an Editable text copies folder. The visible pixels and editable copy do not synchronize.
The exporter accepts CE.SDK engine versions from 1.83.0. That minimum describes API compatibility. Text layout, fonts, and raster fallback rendering also depend on the installed CE.SDK runtime. Updating the JavaScript exporter does not update the engine or supply fixes from a later SDK release. Rendering can differ between CE.SDK and Photoshop.
The same package runs in Node.js with @cesdk/node. The Node.js guide exports a scene on a server and also saves source previews.
Troubleshooting#
The exporter does not load in the browser — Version 0.1.0 of @imgly/psd-exporter runs only in Node.js. Install a later version. Use a bundler that reads the package’s browser field, such as Vite in this example, so that the font decoder loads its browser build.
A font or image cannot be loaded — Check its URL and cross-origin access settings. Export needs access to the source resources and the fonts of the design.
Text or an effect is no longer editable — Review the export messages in the browser console for a raster fallback. Use a supported editable style when the recipient needs to change that content.
The document looks different in Photoshop — Check that Photoshop has the fonts of the design, then inspect the export diagnostics. Verify the installed CE.SDK runtime as well as the exporter version.
API Reference#
| Method / Result | Description |
|---|---|
exportPsd(engine) |
Return one { pageName, psd } entry per page plus a logger |
engine.scene.saveToArchive() |
Save the current scene and its resources as a Blob |
CreativeEngine.init(config) |
Create the second engine for the export |
logger.getMessages() |
Read messages with type, code, message, and optional meta |
engine.scene.loadFromArchiveURL(source, false, true) |
Load a design and wait for its resources |
engine.scene.zoomToBlock(page, options) |
Frame a page in the editor |
cesdk.ui.showNotification(notification) |
Report completion or failure |