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.
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.
Hello,
Please check the image exists and can be added. The package include an example very similar than the script you're doing and it works perfectly. Please check it to find any issue in your script.
Regards.
Hello,
Can you please my code that i have posted in this topic?
I have used same code in my script
Thanks
jayant
Hello,
We have answered by email to your manager that wrote directly to our support department. He can send you more information.
Regards.
Hello,
WordFragment still creating issues in corporate package
in trial version ,its working
Can you please help me?
Thanks
Jayant
Hello,
It's working perfectly. Please check your email.
Regards.