Forum


Replies: 5   Views: 3487
Word fragment not working in corporate package
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 jayant.a  · 05-06-2015 - 08:38

Hello, I have using following code to add image in word template by word fragment but image not showing. $picture = APP .WEBROOT_DIR . DS .$ResumeBuilderProfileData['ResumeBuilderProfile']['picture']; $wf = new Phpdocx\Elements\WordFragment($docx, 'document'); //create an image fragment $image = new Phpdocx\Elements\WordFragment($docx, 'document'); $image->addImage(array('src' => $picture , 'scaling' => 50, 'float' => 'right', 'textWrap' => 1)); $text = array(); $text[] = $image; //insert all the content in the Word fragment we are going to use for replacement $wf->addText($text); $docx->replaceVariableByWordFragment(array('Picture' => $wf), array('type' => 'block')); Can anyone help me? Thanks Jayant.