This document is about how to set up and use the DesignMap object.
Table of contents
Every IDML file needs a DesignMap. Create one and set it to the Content object:
<?php use IDML\Content\DesignMap; $designMap = new DesignMap(); $content ->setDesignMap($designMap) ;
The document language can be set with the help of the Content Language Enum.
<?php use IDML\Content\Language\Language; use IDML\Content\Enum\Content\Language as LanguageEnum; /** * This will set the language to german and danish. */ $designMap ->addLanguage( new Language(LanguageEnum::DE_DE_2006()), new Language(LanguageEnum::DANISH()) ) ;
The document's color profiles can be set like that:
<?php use BitAndBlack\ICCProfile\ICCProfile; $designMap ->addColorProfile( new ICCProfile('/path/to/your/custom.icc') ) ;
You can use the ICC profiles as a PHP dependency! IDML-Creator makes use of the bitandblack/iccprofile library, which comes with a huge folder of profiles. If you want to use them, you'll find them under
/vendor/bitandblack/iccprofile/data. All profiles can be used with the help of an Enum:
<?php use BitAndBlack\ICCProfile\File; use BitAndBlack\ICCProfile\FileEnum; use BitAndBlack\ICCProfile\ICCProfile; $iccFile = new File(FileEnum::PROFILE_PSOcoated_v3()); $designMap ->addColorProfile( new ICCProfile($iccFile) ) ;