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.
Creating Spreads and Master Spreads. Adding single or double pages. Creading pages in different sizes.
Adding colors from CMYK, PANTONE, HKS, RGB, HEX, RAL and LAB. Adding ICC color profiles.
Adding paragraph styles, character styles, object styles, table styles and cell styles. Passive and native inheritance.
Adding text frames, rectangles, polygons, ovals and lines.
Adding fonts from anywhere. Supports also variable fonts.
Creating a beautiful typography by working with kerning, different spaces, different break characters, and a lot more.
Using text variables to automatically create pagination, indexes, references and running titles.
Adding images. Supports TIF, JPEG, PNG, SVG, EPS, PDF and more.
Working with different languages. Using individual word wrap rules.
IDML-Creator makes it simple to create an IDML in PHP. Have a look! The PHP code creates this document:
<?php
use BitAndBlack\IdmlWriter\File\Tree;
use BitAndBlack\IdmlWriter\Writer;
use Color\Value\CMYK;
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\Language\Language;
use IDML\Content\Page;
use IDML\Content\Story\CharacterStyleRange;
use IDML\Content\Story\ParagraphStyleRange;
use IDML\Content\Story\Text;
use IDML\Content\TextFrame\TextFrame;
use IDML\Factory;
/** Requires composers autoload */
require_once 'vendor/autoload.php';
/** Sets up a new document */
$factory = new Factory();
$factory->createBackingStory();
$factory->createContainer();
$factory->createTag();
/** This is the language we want to use */
$language = new Language(LanguageEnum::ENGLISH_UK);
/** Creates the DesignMap */
$designMap = $factory->createDesignMap()
->addLanguage($language)
;
/** Defines some basics */
$preference = $factory->createPreference()
->setSinglePage(true)
->setDocumentFormat(210, 297, Unit::MILLIMETERS)
->setDocumentBleed(3, Unit::MILLIMETERS)
;
/** Creates a black Color */
$black = $factory->createColor('Black')
->setColorValue(new CMYK(0, 0, 0, 100))
->setModel(ModelEnum::PROCESS)
;
/** Creates a red Color */
$red = $factory->createColor('Red')
->setColorValue(new CMYK(0, 100, 100, 0))
->setModel(ModelEnum::PROCESS)
;
/** Creates some Font Styles */
$myriadPro = new FontFamily('Myriad Pro');
$myriadProRegular = $factory->createFontStyle($myriadPro, 'Regular');
$myriadProBold = $factory->createFontStyle($myriadPro, 'Bold');
/** Creates a Character Style */
$boldRed = $factory->createCharacterStyle('Bold + Red')
->setFillColor($red)
->setFontStyle($myriadProBold)
;
/** Creates a Paragraph Style */
$myParagraphStyle = $factory->createParagraphStyle('Body')
->setPointSize(12)
->setLineHeight(18)
->setFillColor($black)
->setFontFamily($myriadPro)
->setFontStyle($myriadProRegular)
->setAppliedLanguage($language)
;
/** Creates a Story */
$myStory = $factory->createStory()
->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 = $factory->createSpread()
->addPage($page)
;
/** Sets up the writer object and creates an IDML file */
$writer = new Writer(
$factory->getContent(),
new Tree()
);
$writer->create(__DIR__ . DIRECTORY_SEPARATOR . 'singlePage.idml');
Fully individualized layout documents combined with AI and the whole power of the World Wide Web.
Creates calendar templates to make it easy for designers to work with calendars. They no longer need to worry about the calendar information!
Software development, Web2Print, Print2Web, connecting dots between digital und printing media.
And many more all around the world!