Thank you, it's working fine. One more moment, after generating a DOCX I need to transform it to PDF. But the resulted PDF file instead of numbers has bullets. I need the exact same look
$docx = new CreateDocx();
$decimalOptions = array();
$decimalOptions[0]['type'] = '1';
$decimalOptions[0]['format'] = '%1.';
$decimalOptions[1]['type'] = '1';
$decimalOptions[1]['format'] = '%1.%2.';
$decimalOptions[2]['type'] = '1';
$decimalOptions[2]['format'] = '%1.%2.%3';
$docx->createListStyle('decimal', $decimalOptions);
$html = '
<ol class="decimal">
<li>First item.</li>
<li>Second item with subitems:
<ol>
<li>First subitem.</li>
<li>Second subitem.
<ol>
<li>First subitem.</li>
<li>Second subitem.</li>
</ol>
</li>
</ol>
</li>
<li>Third subitem.</li>
</ol>';
$docx->embedHTML($html, array('customListStyles' => true));
$docx->createDocx('test.docx');
$transform = new TransformDocAdvPDF('test.docx');
$transform->transform('test.pdf');