Forum


Replies: 5   Views: 3273
Only variables should be passed by reference
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  · 01-03-2017 - 14:45

Hello,

It seems one of the strings you are adding is not being readed correctly. Please run one of the included examples (Core/embedHTML/sample_1.php) to test the conversion from HTML to DOCX using a tested script and then try to run each your script standalone (using PHP CLI for example) to know where the error comes from.

This simple script runs perfectly:

<?php

require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();
$docx->embedHTML("<img src='http://www.somkiat.cc/wp-content/uploads/2016/07/ErrorMessage.jpg' />");
$docx->createDocx('output.docx');

Maybe $body var has something wrong in it or if you are integrating it with a CMS or framework there's some error in how to have integrated the library. Please try to run your script standalone (out of any CMS or framework).

The trial package is the same than the Basic package but with the document properties overwritten, and image and text watermarks.

Regards.