javascript,php,ms-word,phpdocx
I believe your statement might not be complete. According to the documentation, it should be formed as: public replaceTemplateVariableByHTML (string $var, string $type, string $html [, array $options]) Depending on what exactly you're trying to achieve, you can try this: $docx->replaceVariableByHTML($key, 'block', $value, array('isFile' => false, 'parseDivsAsPs' => true, 'downloadImages'...
Well I did some more research and came up with the solution. First i make my property array which makes sure that the width and height is set to auto for my inserted image. $logoProperties = array( 'height' => 'auto', 'width' => 'auto' ); Then i call the replacePlaceholderImage as...
You don't need to use ob clean or flush; there is a built in function that does that for phpdocx: For example: require_once '../../classes/CreateDocx.inc'; $docx = new CreateDocx(); $text = 'Lorem ipsum dolor sit amet.'; $docx->addText($text, $paramsText); $docx->createDocxAndDownload('example_text'); @ref: http://www.phpdocx.com/api-documentation/layout-and-general/create-and-download-docx-with-PHP...