I am currently generating multiple .docx files using PHPWord. I need to find a way to combine these docx files and save them as 1 pdf file. Is there a way that this can be done?
Open the generated docx with PHPDOCX http://www.phpdocx.com/
require_once 'phpdocx_pro/classes/TransformDoc.inc';
$docx = new TransformDoc();
$docx->setStrFile('document.docx');
$docx->generateXHTML();
$html = $docx->getStrXHTML();
Also, you can export the docx to PDF with
$docx->generatePDF();
Note this is not a free library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With