I'm almost there! Bought phpdocx corporate, uploaded it to my website, installed Tidy & XSL PHP extensions (recompiled php in the process), configured the component, etc etc.
Retrieving .docx template, filling it with data and saving it: no problems whatsoever. Brilliant. However the last step is giving me problems: converting to a PDF. OpenOffice service is running (I think), paths are ok etc.
An error is thrown (could be a warning, though): in file: /home/pyramedia/domains/maris-online.nl/public_html/tst10/includes/phpdocx/pdf/class.tcpdf.php on line 4: Declaration of MYPDF::ImageSVG() should be compatible with that of TCPDF::ImageSVG()(error type 2048)
The script itself runs but there is no PDF saved.. What am I doing wrong? Desperately need this last step to work..
The final part of my code is:
//maak bestandsnaam factuur
$filename = 'Voorbeeld ' . $factuurnr;
$fullfile = APP_RELPATH . '/uploads/' . $_SESSION['klantcode'] . '/facturen/' . $filename;
$fullpath = APP_PATH . '/uploads/' . $_SESSION['klantcode'] . '/facturen/' . $filename;
echo $fullfile;
$docx->createDocx($fullfile);//we send the resulting document to the browser
$docx->transformDocx($fullfile . '.docx', $fullfile . 'test.pdf');
Thanks in advance,
Wouter Broekman
Pyramedia BV