Forum


Replies: 7   Views: 2717
Wordfragment in table cell significantly slows performance
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 irishadar  · 08-01-2018 - 13:24

hi,

I need to chance the color of txt acoording to it's content ,

so i am using "WordFragment" :

$OwnFragment = new WordFragment($docx, 'document');
$textOwn = array();
if ($vownership === 'חסר') {
        $textOwn[]=array(
                        'text' => $vownership,
                        'color' => 'red'
                        );      
$OwnFragment->addText($textOwn);                     

and then push it into cell in table .

'OWN'=>$OwnFragment,

this small change takes over an hour to acomplish , and somtims it even fails.

is there a better way of doing what i need ?

 

best 

iris hadar