The K2F format operates on a dual-state architecture: an editable semantic JSON tree (State A) and a compiled, pixel stable lock (document.K2F.lock / State C) packaged inside a self-contained ZIP archive. While IDML stores uncompiled layout instructions that rely entirely on Adobe InDesign's proprietary desktop composition engine and local system fonts, K2F compiles semantic intent into deterministic geometry using a dedicated Rust reference layout engine (k2f_layout), strictly isolating content meaning from visual theme primitives and mandating embedded fonts.
K2F is not a lossless superset of IDML. K2F v0.1 does not import or convert IDML packages (IDML_IS_NOT_A_SOURCE), does not import PDF files (PDF_IS_NOT_A_SOURCE), does not support prepress CMYK separations or spot color plates (such as Pantone), does not support arbitrary Bézier vector art directly in State A, and does not replicate InDesign's micro-typographic layout engine (such as the Adobe Paragraph Composer, optical margin alignment, or GREP styles). All export formats derived from K2F are unidirectional paints of the compiled lock rather than editable sources of truth.
At a glance
| Topic | IDML | K2F |
|---|---|---|
| What the file is | Multi-part XML archive (.idml) serializing InDesign's internal application DOM | Semantic JSON tree (State A) + compiled render lock (State C) in a ZIP archive |
| Primary authoring model | Visual desktop publishing (DTP) by human graphic designers in Adobe InDesign | Programmatic authoring and editing by AI agents and automated code pipelines |
| Rendering architecture | Runtime layout executed by InDesign's proprietary desktop or server composition engine | Dual-state model: viewers paint pre-compiled document.K2F.lock directly without reflowing text |
| Pixel-stable pages & fonts | Drift-prone across InDesign versions; no embedded font binaries (causes font-substitution warnings and reflow) | Yes — viewers paint the lock directly; mandatory embedded fonts guarantee cross-device pixel stability |
| Node addressing for AI | Transient, volatile memory UIDs (Self="u12e") fragmented across dozens of XML files | Mandatory, hierarchical dotted IDs (parent.child.role) on every semantic node in State A |
| Text overset risk | Fixed-coordinate text frames silently clip/hide overflow text with no automated recovery | Engine automatically recalculates geometry, line wraps, and page flow upon recompilation |
| Separation of concerns | Content streams contain nested character and paragraph style overrides mixed with layout geometry | Strict separation: zero styling on State A nodes; visual primitives live exclusively in styles/theme.json |
| Arbitrary vector drawing | Native Bézier pen tools, compound paths, pathfinders, and direct vector artwork on spreads | Forbidden in State A JSON; external vector assets stored as pre-rendered SVGs or images in /assets/ |
| Prepress & color separation | Native CMYK, spot colors (Pantone), ink trapping, bleed/slug, and PDF/X | RGB and hex color palette support in themes; no native CMYK separations, spot colors, or printer marks in v0.1 |
| Multi-format supply chain | Single-ecosystem silo: converting to editable Word or PowerPoint requires third-party tools | Single-source lock-drawn exports to Microsoft Word (.docx), PowerPoint (.pptx), PDF AcroForms, and InDesign (.idml) |
| Cryptographic integrity | No checksums, digital signatures, or tamper-detection mechanisms in the format | Cryptographic hashes (content_hash, appearance_hash), Ed25519 signatures, mandatory viewer banner (SIGNED, UNSIGNED, SIGNED_BUT_BROKEN, BROKEN_INTEGRITY, UNLOCKED) |
| Import / Source of truth | Editable source for InDesign and DTP workflows; InDesign exports IDML | .K2F is sole source of truth; K2F does not import IDML (IDML_IS_NOT_A_SOURCE) or PDF (PDF_IS_NOT_A_SOURCE); exports are read-only paints of the lock |
IDML vs K2F: What IDML is good at
IDML remains the standard open interchange format for professional graphic design, prepress workflows, and desktop publishing:
- Commercial print, prepress, and color management: Full native support for CMYK color spaces, spot colors (Pantone Matching System, DIC, TOYO), ink density limits, overprint controls, ink trapping specifications, and direct export to certified ISO print standards (PDF/X-1a, PDF/X-3, PDF/X-4). Precise printer marks include bleed areas, slug areas, crop marks, registration marks, and color bars.
- Micro-typography and typesetting refinement: The Adobe Paragraph Composer performs multi-line global dynamic optimization, evaluating all potential line breaks across an entire paragraph to balance hyphenation and inter-word spacing variance. Typographic controls include optical kerning (visual glyph shape spacing calculated on the fly without relying on font kern tables), optical margin alignment (hanging punctuation), nested styles (triggering character styles by delimiters or words), GREP styles (dynamic regex-based styling applied during composition), balance ragged lines, and granular hyphenation and justification (H&J) controls.
- Arbitrary vector drawing and graphic effects: Comprehensive Bézier pen tooling directly on spreads, compound paths, pathfinder operations (unite, subtract, intersect), custom corner effects, gradient feathering, drop shadows, and complex clipping masks.
- Long-form publication management: Multi-document book management (
.indb), chapter synchronization, cross-references, multi-level index generation, automated running headers and footers, and footnotes/endnotes. - Professional designer and publishing ecosystem: Extensive ecosystem of trained graphic designers, prepress technicians, and specialized enterprise catalog/automation plugins (such as Silicon Publishing, Priint:comet, and Enfocus PitStop).
What K2F adds
K2F is designed for workflows where automated systems and AI agents require deterministic structure, verifiable rendering, and multi-format delivery:
- Declarative semantic tree & stable dotted IDs: Every node in State A (
content/root.json) carries a mandatory, hierarchical dotted ID (e.g.,financials.q3_results.table_revenue,contract.clauses.clause_4_indemnity). AI agents target, read, patch, diff, and revert specific content nodes deterministically without scraping visual coordinates, traversing fragmented multi-file XML DOMs, or managing volatile memory UIDs (Self="u12e"). - Deterministic geometry calculation without text overset: In IDML, modifying text inside fixed-coordinate frames (
GeometricBounds) frequently triggers text overset—content silently spills past the frame boundary, becomes invisible, and breaks the layout with no automated recovery. In K2F, State A contains no physical frame coordinates; the reference layout engine (k2f_layout) deterministically recomputes geometry, line wraps, and page flow upon recompilation, ensuring that agent edits do not silently clip text. - Pre-compiled pixel-stable lock (
document.K2F.lock): IDML contains uncompiled layout instructions that drift across InDesign versions, operating systems, and third-party apps, while omitting font binary data (causing missing-font warnings and reflow). K2F packages mandate embedded fonts (fonts/) and include a pre-compiled render lock (State C). Official web embedders (<k2f-viewer>), desktop readers, and export tools paint this lock directly without re-running layout math. - Strict intent-presentation separation: In IDML, styling is tangled with content, frequently polluted by local character and paragraph style overrides in story streams. K2F strictly forbids inline styling on State A nodes; visual primitives live exclusively in
styles/theme.json. Swapping or modifying a theme re-skins the entire document deterministically across all nodes upon recompilation (k2f pack) without risking layout corruption or broken styling hierarchies. - Cryptographic provenance & mandatory integrity banners: IDML has no cryptographic verification—anyone can modify the XML inside the ZIP container undetected. K2F provides SHA-256 hashing (
content_hash,appearance_hash) and optional Ed25519 digital signatures (signatures/v1.json). Official readers enforce a standardized integrity banner displaying five canonical states (SIGNED,UNSIGNED,SIGNED_BUT_BROKEN,BROKEN_INTEGRITY,UNLOCKED), while alerting users to runtime layout engine discrepancies (ENGINE_MISMATCH). - Single-source multi-format publishing (including IDML export): A single
.K2Fdocument compiles once to produce lock-drawn deliverables for Microsoft Word (.docx), PowerPoint (.pptx), interactive PDF (with native fillable AcroForm fields viaform_fieldnodes), and Adobe InDesign (.idml). The K2F CLI (k2f export-idml) exports an InDesign package containing{stem}.idmlbundled alongside aDocument Fonts/directory, allowing human graphic designers to open the file in InDesign without missing-font dialogs. - Agent tooling and template ecosystem: K2F provides an official agent skill implementing the
agent_v0authoring dialect, automated schema verification utilities (pack_verify), and a public Gallery of 469+ production-grade templates on k2f.dev with bundled multi-format exports (.K2F,.docx,.pptx,.idml) available without accounts, subscriptions, or watermarks.
When to pick which
-
Pick IDML (Adobe InDesign) when:
- Producing commercial offset print collateral, packaging, magazines, high-end catalogs, or books that require CMYK plate separations, Pantone spot colors, ink trapping, and printer marks (bleed and slug).
- Human art directors and graphic designers require direct visual layout manipulation, Bézier vector tooling, custom typography, and micro-typographic refinement (such as optical margin alignment and GREP styles).
- Existing enterprise publishing workflows rely on InDesign Server, specialized catalog plugins (e.g., Priint:comet, EasyCatalog), or prepress automation suites (e.g., Enfocus PitStop).
-
Pick K2F when:
- AI agents and automated software pipelines must generate, inspect, patch, or restyle documents programmatically using stable dotted node IDs with schema validation and verification utilities (
pack_verify). - Documents require automatic geometry calculation without the risk of silent text overset clipping.
- Organizations need to publish from a single source to Microsoft Word, PowerPoint, fillable AcroForm PDF, and Adobe InDesign simultaneously.
- Documents require self-contained packages with embedded fonts, pre-compiled pixel-stable render locks, theme-based re-skinning, and cryptographic tamper-evident integrity banners.
- AI agents and automated software pipelines must generate, inspect, patch, or restyle documents programmatically using stable dotted node IDs with schema validation and verification utilities (
-
Exporting from K2F to InDesign:
- Use K2F as the AI-native authoring source, then export an InDesign package (
k2f export-idml) bundled withDocument Fonts/for human graphic designers to perform final prepress polishing. Deliverables exported from K2F are unidirectional drawings of the lock, not editable sources of truth (IDML_IS_NOT_A_SOURCE,PDF_IS_NOT_A_SOURCE,DOCX_IS_NOT_A_SOURCE,PPTX_IS_NOT_A_SOURCE). All structural updates must occur in K2F State A.
- Use K2F as the AI-native authoring source, then export an InDesign package (
Bottom line
For additional details on K2F architecture, explore the technical documentation, review pre-built templates in the Gallery, read why K2F exists, or view the full matrix on Compare.
This comparison is based on publicly available information at the time of writing. Capabilities, pricing, and policies may change; verify details with the relevant provider.