IDML-Creator is the world's first PHP Framework for creating IDML files.

The IDML-Creator makes it possible to create IDML files for Adobe InDesign with PHP. It can be easily integrated into websites, content management systems and e-commerce systems. IDML-Creator enables the creation of fully individualized layouts, automated and in thousands every single day.

Which InDesign functions IDML-Creator provides?

IDML-Creator provides nearly all possibilities of InDesign and is on the way to provide all of them soon. A few of them are:

Spreads and Pages

Creating Spreads and Master Spreads. Adding single or double pages. Creading pages in different sizes.

Colors and Color Profiles

Adding colors from CMYK, PANTONE, HKS, RGB, HEX, RAL and LAB. Adding ICC color profiles.

Style Formats

Adding paragraph styles, character styles, object styles, table styles and cell styles. Passive and native inheritance.

Page objects

Adding text frames, rectangles, polygons, ovals and lines.

Fonts

Adding fonts from anywhere. Supports also variable fonts.

Typography

Creating a beautiful typography by working with kerning, different spaces, different break characters, and a lot more.

Text variables and pagination

Using text variables to automatically create pagination, indexes, references and running titles.

Images

Adding images. Supports TIF, JPEG, PNG, SVG, EPS, PDF and more.

Languages

Working with different languages. Using individual word wrap rules.

How does it look like?

IDML-Creator makes it simple to create an IDML in PHP. Have a look! The PHP code creates this document:


singlePage.idml (5 KB)

<?php

use Color\Value\CMYK;
use IDML\Content;
use IDML\Content\BackingStory;
use IDML\Content\Color\Color;
use IDML\Content\Container;
use IDML\Content\DesignMap;
use IDML\Content\Enum\Color\Model as ModelEnum;
use IDML\Content\Enum\Content\Language as LanguageEnum;
use IDML\Content\Enum\Unit;
use IDML\Content\Font\FontFamily;
use IDML\Content\Font\FontStyle;
use IDML\Content\Language\Language;
use IDML\Content\Page;
use IDML\Content\Preference;
use IDML\Content\Spread\Spread;
use IDML\Content\Story\CharacterStyleRange;
use IDML\Content\Story\ParagraphStyleRange;
use IDML\Content\Story\Story;
use IDML\Content\Story\Text;
use IDML\Content\Style\CharacterStyle;
use IDML\Content\Style\ParagraphStyle;
use IDML\Content\Tag;
use IDML\Content\TextFrame\TextFrame;
use IDML\Writer\File\Tree;
use IDML\Writer\Writer;

/** Requires composers autoload */
require_once 'vendor/autoload.php';

/** This is the language we want to use */
$language = new Language(
    LanguageEnum::ENGLISH_UK()
);

/** Creates the DesignMap */
$designMap = new DesignMap();
$designMap
    ->addLanguage($language)
;

/** Defines some basics */
$preference = new Preference();
$preference
    ->setSinglePage(true)
    ->setDocumentFormat(210, 297, Unit::MILLIMETERS())
    ->setDocumentBleed(3, Unit::MILLIMETERS())
;

/** Sets up a new document */
$content = new Content();
$content
    ->setDesignMap($designMap)
    ->setPreference($preference)
    ->setBackingStory(new BackingStory())
    ->setContainer(new Container())
    ->setTag(new Tag())
;

/** Creates a black Color */
$black = new Color('Black');
$black
    ->setColorValue(
        new CMYK(0, 0, 0, 100)
    )
    ->setModel(ModelEnum::PROCESS())
;

/** Creates a red Color */
$red = new Color('Red');
$red
    ->setColorValue(
        new CMYK(0, 100, 100, 0)
    )
    ->setModel(ModelEnum::PROCESS())
;

/** Creates some Font Styles */
$myriadPro = new FontFamily('Myriad Pro');
$myriadProRegular = new FontStyle($myriadPro, 'Regular');
$myriadProBold = new FontStyle($myriadPro, 'Bold');

/** Creates a Character Style */
$boldRed = new CharacterStyle('Bold + Red');
$boldRed
    ->setFillColor($red)
    ->setFontStyle($myriadProBold)
;

/** Creates a Paragraph Style */
$myParagraphStyle = new ParagraphStyle('Body');
$myParagraphStyle
    ->setPointSize(12)
    ->setLineHeight(18)
    ->setFillColor($black)
    ->setFontFamily($myriadPro)
    ->setFontStyle($myriadProRegular)
    ->setAppliedLanguage($language)
;

/** Creates a Story */
$myStory = new Story();
$myStory->addContent(
    new ParagraphStyleRange(
        $myParagraphStyle,
        new CharacterStyleRange(
            null,
            new Text('Hello World! We\'re happy to have you here! This document was created by ')
        ),
        new CharacterStyleRange(
            $boldRed,
            new Text('IDML-Creator')
        ),
        new CharacterStyleRange(
            null,
            new Text('. Get more information about it under www.bitandblack.com ')
        )
    )
);

/** Creates a TextFrame and adds the Story */
$textFrame = new TextFrame();
$textFrame
    ->setPosition(20, 20, Unit::MILLIMETERS())
    ->setSize(170, 257, Unit::MILLIMETERS())
    ->setParentStory($myStory)
    ->setColumns(1, 10, Unit::MILLIMETERS())
;

/** Creates a Page */
$page = new Page();
$page
    ->setFormat(210, 297, Unit::MILLIMETERS())
    ->setMargin(20, 20, 20, 20, Unit::MILLIMETERS())
    ->setColumns(1, 10, Unit::MILLIMETERS())
    ->addElement($textFrame)
;

/** Creates a Spread and adds the Page */
$spread = new Spread();
$spread
    ->addPage($page)
;

/** Registers all contents */
$content
    ->addStory($myStory)
    ->addColor($black, $red)
    ->addFont($myriadProRegular, $myriadProBold)
    ->addParagraphStyle($myParagraphStyle)
    ->addCharacterStyle($boldRed)
    ->addSpread($spread)
;

/** Sets up the writer object and creates an IDML file */
$writer = new Writer(
    $content,
    new Tree()
);
$writer->create(__DIR__ . DIRECTORY_SEPARATOR . 'singlePage.idml');

What benefits does the IDML Creator offer you.

Integration

Seamless integration into content management and e-commerce systems such as Typo3, WordPress, Magento, Shopware, WooCommerce through the PHP architecture. Connection to PIM systems and many more also possible.

Safety

Semantic versioning guarantees the integration of fixes and updates in connection with constant compatibility with your code. Can also be used in deployments thanks to its integration with Composer.

Modern Workflow

Enables modern workflows in which information from data sources is output in different channels. Enables One-to-One Marketing, individualization and much more!

Who else uses IDML-Creator?

Fully individualized layout documents combined with AI and the whole power of the World Wide Web.

www.manyprintsolutions.com

Creates calendar templates to make it easy for designers to work with calendars. They no longer need to worry about the calendar information!

www.calidar.io

Software development, Web2Print, Print2Web, connecting dots between digital und printing media.

www.bitandblack.com

And many more all around the world!

Join our revolution by changing the way, printing layouts are getting made!

Get in contact! Read the documentation

Want to test the IDML-Creator in your project? Use our demo library.

Frequently Asked Questions

What is an IDML file?

»IDML« means (Adobe) InDesign Markup Language and stands for an XML-based file format.

What opens IDML files?

IDML files can be opened with Adobe InDesign since CS4 (version 6), and also QuarkXPress (since version 2018) and Affinity Publisher (since version 1.8).

Is IDML better than INDD?

For sure! INDD files are closed-ones while IDML is an XML-based container format. There is a good chance that XML will be supported in many years from now—but there's no guarantee that INDD files may be opened in the future.

Does the IDML-Creator only runs in PHP?

At the moment: yes. Please tell us if you have need for creating IDML files in another programming language.

How can I integrate the IDML-Creator into my project?

As every other modern library, IDML-Creator can be added to a project with the help of PHP's dependency manager Composer.

I'm not a programmer, can I use the IDML-Creator anyway?

For sure! We provide a wide range of support and are also able to write a custom integration for your project.