{"id":19253689,"url":"https://github.com/imgly/idml-importer","last_synced_at":"2025-07-20T09:05:49.790Z","repository":{"id":254417004,"uuid":"704424216","full_name":"imgly/idml-importer","owner":"imgly","description":"Import IDML files into the Creative Editor Ecosystem","archived":false,"fork":false,"pushed_at":"2025-03-07T11:55:05.000Z","size":382,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T08:38:21.195Z","etag":null,"topics":["cesdk","creative-editor","idml","importer","indesign"],"latest_commit_sha":null,"homepage":"https://img.ly/showcases/cesdk/indesign-template-import/web","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imgly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-13T08:22:37.000Z","updated_at":"2025-03-07T11:54:39.000Z","dependencies_parsed_at":"2024-08-23T10:46:58.587Z","dependency_job_id":"e1c7e939-221a-4c03-8d25-9416715c7790","html_url":"https://github.com/imgly/idml-importer","commit_stats":null,"previous_names":["imgly/idml-importer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Fidml-importer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Fidml-importer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Fidml-importer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imgly%2Fidml-importer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imgly","download_url":"https://codeload.github.com/imgly/idml-importer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248398917,"owners_count":21097294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cesdk","creative-editor","idml","importer","indesign"],"created_at":"2024-11-09T18:32:42.801Z","updated_at":"2025-07-20T09:05:49.753Z","avatar_url":"https://github.com/imgly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InDesign Importer for the CE.SDK\n\n\u003e See the [changelog](CHANGELOG.md) for a detailed history of updates and improvements.\n\n## Overview\n\nThe InDesign Importer for the CE.SDK allows you to seamlessly integrate InDesign files into the editor while retaining essential design attributes.\n\nHere's an overview of the main features:\n\n- _File Format Translation_: The importer converts **IDML files** from Adobe InDesign into the CE.SDK scene file format. The resulting scene archive includes all required assets for immediate use.\n- _Bulk Importing_: The codebase is adaptable for bulk importing, streamlining large-scale projects.\n- _Color Translation_: While CMYK support is in progress, CMYK colors from InDesign are translated into RGB.\n\nThe following InDesign design elements will be preserved by the import:\n\n- _Element grouping_: grouped elements will be preserved and treated as a single unit.\n- _Positioning and Rotation_: Elements' positioning and rotation are accurately transferred.\n- _Image Elements_: Embedded images are supported, while image cropping is not yet available.\n- _Text Elements_: Font family continuity is maintained, with options to supply font URIs or use Google fonts. Only bold and italic styles are currently supported.\n- _Shapes_: Rect, Oval, Polygon, and Line shapes are supported, along with custom shapes that might experience minor distortion.\n- _Colors and Strokes_: Gradient and solid colors, stroke weight, color, and alignment are faithfully reproduced.\n- _Transparency_: Transparency is preserved for seamless integration.\n\nThis InDesign Importer bridges the gap between InDesign files and CE.SDK scenes, enabling efficient transitions while retaining crucial design details. Your input is invaluable as we continue to refine and improve the importer's capabilities.\n\n## Installation\n\nYou can install `@imgly/idml-importer` via npm or yarn. Use the following commands to install the package:\n\n```shell\nnpm install @imgly/idml-importer\nyarn add @imgly/idml-importer\n```\n\n## How to prepare your InDesign file:\n\n- Make sure to embed all images in your InDesign file. The importer does not support linked images.\n\n## Browser Quick-Start Example\n\n```js\nimport CreativeEngine from \"@cesdk/engine\";\nimport { IDMLParser, addGoogleFontsAssetLibrary } from \"@imgly/idml-importer\";\n\nconst blob = await fetch(\n  \"https://img.ly/showcases/cesdk/cases/indesign-template-import/socialmedia.idml\"\n).then((res) =\u003e res.blob());\nconst engine = await CreativeEngine.init({\n  license: \"YOUR_LICENSE\",\n});\n// We use google fonts to replace well known fonts in the default font resolver.\nawait addGoogleFontsAssetLibrary(engine);\nconst parser = await IDMLParser.fromFile(engine, blob, (content) =\u003e\n  new DOMParser().parseFromString(content, \"text/xml\")\n);\n\nawait parser.parse();\n\nconst image = await engine.block.export(\n  engine.block.findByType(\"//ly.img.ubq/page\")[0],\n  \"image/png\"\n);\nconst sceneExportUrl = window.URL.createObjectURL(image);\nconsole.log(\"The imported IDML file looks like:\", sceneExportUrl);\n// You can now e.g export the scene as archive with engine.scene.saveToArchive()\n```\n\n## NodeJS Quick-Start Example\n\nWhen using in NodeJS, you need to provide a DOM implementation. We recommend using JSDOM.\n\n```js\n// index.mjs\n// We currently only support ES Modules in NodeJS\nimport CreativeEngine from \"@cesdk/node\";\nimport { promises as fs } from \"fs\";\nimport { JSDOM } from \"jsdom\";\nimport { IDMLParser } from \"@imgly/idml-importer\";\n\nasync function main() {\n  const engine = await CreativeEngine.init({\n    license: \"YOUR_LICENSE\",\n  });\n\n  const idmlSampleUrl =\n    \"https://img.ly/showcases/cesdk/cases/indesign-template-import/socialmedia.idml\";\n  const idmlSample = await fetch(idmlSampleUrl).then((res) =\u003e res.blob());\n  const idmlSampleBuffer = await idmlSample.arrayBuffer();\n  const parser = await IDMLParser.fromFile(\n    engine,\n    idmlSampleBuffer,\n    (content) =\u003e {\n      return new JSDOM(content, {\n        contentType: \"text/xml\",\n        storageQuota: 10000000,\n        url: \"http://localhost\",\n      }).window.document;\n    }\n  );\n  await parser.parse();\n\n  const image = await engine.block.export(\n    engine.block.findByType(\"//ly.img.ubq/page\")[0],\n    \"image/png\"\n  );\n  const imageBuffer = await image.arrayBuffer();\n  await fs.writeFile(\"./example.png\", Buffer.from(imageBuffer));\n\n  engine.dispose();\n}\nmain();\n```\n\n## Issues\n\nIf you encounter any issues or have questions, please don't hesitate to contact us at support@img.ly.\n\n## Limitations and Unsupported Features\n\nThe IDML importer has some limitations and unsupported features that you should be aware of:\n\n1. **PDF Content**\n\n   - PDF elements in the IDML file will be replaced with placeholder images. This is due to the fact that the CE.SDK does not support PDF content.\n\n2. **Linked Images**\n\n   - Only embedded images are supported. Linked images will be replaced with placeholder images.\n\n3. **Text Frame Overflow**\n\n   - Text that flows between multiple text frames is not supported and may result in text duplication.\n\n4. **Font Support**\n\n   - If a font name is not available as a typeface asset source, it will be replaced with fallback fonts.\n\n5. **Image Frame Fitting**\n\n   - Images that are shrunk inside their frames may not be rendered as expected. The CE.SDK does not support images that are smaller than their frames.\n\n6. **Page Sizes**\n   - Different page sizes within the same document are not supported. All pages will use the dimensions of the first page.\n\n## License\n\nThe software is free for use under the AGPL License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgly%2Fidml-importer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimgly%2Fidml-importer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimgly%2Fidml-importer/lists"}