I'm using 6.5 version of PHPDocX, and I have a method that cleans a piece of HTML and then perfoms the following
// As an example:
for ($i = 0; $i < 20; $i++) {
$html = '<img src="/var/www/images/image.jpg"><p>This is a test</p>';
$element = new WordFragment($docx);
$element->embedHTML($html);
$table['elements][] = [
'name' => 'Test',
'description' => element,
];
}
// Later in the code
$docx->replaceTableVariable($table['elements'], ['firstMatch' => true]);
When I generate the code I can't see the image. The image has permissions to be read/write. If I switch and try to use addImage() method, PHPDocX complains that the image doesn't exist. Any hints on how to fix this, please?
Thanks in advance,