Hello,
You can use the available template methods (https://www.phpdocx.com/documentation/practical/working-with-templates) or DOCXPath (https://www.phpdocx.com/documentation/introduction/docxpath) to change DOCX documents and then convert them to PDF.
We recommend you to check the samples included in the package and on the previous pages.
Regards.