Not sure if this is a phpword or a dompdf concern. I'm using dompdf as an extension to phpword running inside joomla cms. I am able to generate a pdf but the problem is it can only render a limited number of styling like font size, font weight. Font name won't even work, table border width won't change. I did go through the docs; https://phpword.readthedocs.io/en/latest/styles.html
but nothing helped. However, I can see dompdf example at work; https://dompdf.net/examples.php
though I haven't run it personally as I don't see the files for the examples used.