Forum


Replies: 2   Views: 2773
Adding an external docx file does not work
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 davelavinsky  · 07-03-2018 - 18:07

I tried with the simplest example here : https://www.phpdocx.com/api-documentation/word-content/insert-docx-html-rtf-mht-txt-alternative-content-into-Word-with-PHP

<?php
require_once 'config.php';
require_once CB_DIR_3DP.'phpdocx-corporate-5.5/classes/CreateDocx.inc';

$docx = new CreateDocx();

$docx->addText('aaa');
$docx->addExternalFile(array('src' => 'Text.docx'));
$docx->addText('bbb');

$docx->createDocx('example_addExternalFile');
?>

But the output file (example_addExternalFile) just contains

aaa

bbb