Hllo,
Instead of copying the files from one user to other (maybe some rw permission is missing?), we recommend you to clean that folder and regenerate it again using the web server user, then follow the steps explained in the docs folder of the package, copy the macro and run the conversion using this line:
$docx->transformDocument('example_text.docx', 'example_text.pdf', null, array('toc' => true));
The TOC will be generated correcty. If you send to contact[at]phpdocx.com SSH access, the path where phpdocx is installed and an URL to test it using a web browser we'll check it.
Regards.