Forum


Replies: 4   Views: 3317
Html in template
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 champton  · 11-04-2013 - 12:13

I have that fixed. I added a bit of code to your function addTemplateVariable

[code]public function addTemplateVariable($var, $value = '', $settings = '')
{
if($settings == 'html') //added by CH
{
$value= html_entity_decode($value);
}
$template = CreateTemplate::getInstance();
self::$log->info(
'Assign and replace text variable ' . $var . ' in template.'
);
$template->replaceVariable($var, $value, $settings);
}[/code]

This seemed to work well. The only issue I have now is when I generate the PDF. My images are not showing up. I have one large 8.5 x 11 jpg in the header of my word template as a background. I have two text boxes placed where I need my content that is entered by the user goes. My PDF shows a big red x. The image is at 300 dpi for printing purposes. Thoughts?