Forum


Replies: 1   Views: 186
Image file with absolute path not working
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 21-05-2019 - 07:08

Hello,

We have run the following script:

<?php

require_once 'classes/CreateDocx.php';

$docx = new CreateDocx();

$html = '<img src="https://blogix.pacificbmg.com.au/media/2616warby.jpg" width="200" height="200" />';
$docx->embedHTML($html, array('useHTMLExtended' => true, 'downloadImages' => true));

$docx->createDocx('output');
$docx->transformDocument('output.docx', 'output.pdf');

And the image appears correctly in both documents: DOCX and PDF. Please try this script using the PHP CLI mode, do you see the image in the DOCX document? What version of LibreOffice are you using to transform the image?

Regards.