Here is my code :
$docx = new Phpdocx\Create\CreateDocx();
$docx->enableCompatibilityMode();
$text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' .
'officia deserunt mollit anim id est laborum.';
$paramsText = array(
'b' => 'single',
'font' => 'Arial'
);
$docx->addText($text, $paramsText);
$docx->addTableContents(array('autoUpdate' => true,"displayLevels" => "1-2")); // add some headings so they show up in the TOC
$docx->createDocx('example_text');
$docx->transformDocument('example_text.docx', 'example_text.pdf', null, array('toc' => true));
With
$docx->transformDocument('example_text.docx', 'example_text.pdf', null, array('toc' => false));
the PDF is created, but the TOC is not updated.
With 'toc' => true, the conversion fails
I need your help plese. Is-it a bug with version 8 ?