Well, now with the previous version of dompdf the conversion to PDF does work for me, but it still doesn't keep the original design such as typography, borders, orientation and settings in general.
In my particular case, I have a template .docx
$docx = new Phpdocx\Create\CreateDocxFromTemplate('InvoiceTemplate.docx');
Replace some variables
$docx->replaceVariableByText($variablesFooters, $options);
Then convert to PDF, without losing any style, keeping everything in its original appearance.
$docx->transformDocument('Invoice.docx', 'Invoice.pdf');
What solution could help me specifically?
Is libreoffice the only one that could help me?