Forum


Replies: 4   Views: 3637
Problem with character '&' generating docx (free version)
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 darkangelo  · 13-07-2011 - 17:33

I have a problem when I generate a document, if there is at least one word with the character ampersand (&) the document crash and doesn't open, I tested in the sample form of the section Demo of this site and it's crashed too, here is an example for your test, please help me and sorry for my english is not very well.

$paramsHeader = array(
'font' => 'Humnst777 BT',
'b' => 'single',
'color' => '008000',
'jc' => 'center',
'sz' => 13
);

$docx = new CreateDocx('doc');
$docx->setEncodeUTF8();
$docx->addText('Testing & character', $paramsHeader);

$docx->createDocx('sample');