Hi!
I have the following code in use:
$qrcode_id = $_POST['qrcode_id'];
$image_options = array(
'height' => 2,
'width' => 2,
'target' => 'header',
);
$docx->replacePlaceholderImage('QRCODE', 'docs/'.$qrcode_id.".png" , $image_options);
$docx->createDocx('docs/'.$filename);
But I have a problem with the dynamic file url. If i use it like above, the Word Doc is broken and can't be opened. When using hard coded file path, it works. Also I tried to create the filepath first and save it to another variable and put only a variable into the replacePlaceholderImage function, but it makes no difference. Am I missing something here what might cause to break the creation of the word file while using dynamic paths?
- I've checked the dynamic handover for $qrcode_id, that's coming in correct
- The needed PNG file is on the server and readable - and it works when using the hard coded path.
Thank you for any tips!
Marc