Writes an Adobe IDML file out of a given content
Fund package maintenance!
- php: >=7.2
- maennchen/zipstream-php: ^2.1
- symfony/console: ^5.0 || ^6.0
- ext-zip: *
- phpstan/phpstan: ^0.12 || ^1.0
- phpunit/phpunit: ^7.0 || ^8.0 || ^9.0
- rector/rector: ^0.12
- symplify/easy-coding-standard: ^10.0
- bitandblack/idml-creator: The full version of the IDML-Creator. This library can be used with Private Packagist.
- bitandblack/idml-creator-demo: Creates IDML content natively. This is a demo library.
- bitandblack/idml-validator: Validates IDML files.
- bitandblack/indesign-characters: Special characters used by Adobe InDesign.
This library writes an Adobe IDML file out of a given content.
This library is made for the use with Composer. Add it to your project by running
$ composer require bitandblack/idml-writer.
When creating a new instance of the Writer you need to pass your content as first parameter and the IDML tree as second parameter:
<?php use IDML\Writer\File\Tree; use IDML\Writer\Writer; $writer = new Writer( $myIDMLContent, new Tree() );
The content which is
$myIDMLContent in our example needs to be an object which implements the
Since the structure of an IDML file is always the same, you don't need to customize or set up an own Tree object. But in case you want to you only have to implement the
Create and store the IDML file by running
create() like that:
Alternatively, if you want to get the content to store it by yourself or do whatever else, call
<?php $idmlFileContent = $writer->getContent(); file_put_contents( 'myFile.idml', $idmlFileContent );
Content of an IDML
This library doesn't provide creating any IDML content. Creating content can be done by using the
bitandblack/idml-creator library. Please not that this one has a private license and is not listed public. You can find more information about the IDML Creator library and its documentation under idml-creator.bitandblack.com.
There is also a demo version which you can find under bitandblack/idml-creator-demo.
Validation of IDML files
Adobe provides a schema for the validation of IDML files, which can be found under www.adobe.com. They provide a JAVA based validation only.
We as Bit&Black made a port to PHP, which can be used and implemented with the help of Composer. It can be found at packagist.org by its name
Feel free to contact us under