Forum


Replies: 4   Views: 3305
Header
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 nirzarit  · 21-08-2012 - 04:50

hi there,

How would i add an image in header and footer?
i have tried following example but it didn't work.it generates the word file without image in header.

require_once '../../classes/CreateDocx.inc';
$docx = new CreateDocx();
$paramsHeader = array(
'name' => '../files/img/image.png',
'jc' => 'right',
'font' => 'Arial'
);
$docx->addHeader('Header Arial', $paramsHeader);
$paramsHeader = array(
'font' => 'Times New Roman'
);
$docx->addHeader('Header Times New Roman', $paramsHeader);
$paramsFooter = array(
'pager' => 'true',
'pagerAlignment' => 'center',
'font' => 'Arial'
);
$docx->addFooter('Footer Arial', $paramsFooter);
$paramsFooter = array(
'font' => 'Times New Roman'
);
$docx->addFooter('Footer Times New Roman', $paramsFooter);
$docx->createDocx('../docx/example_header_and_footer');

Please HELP!!!

Thanks

Posted by admin  · 11-04-2013 - 12:13

Hello,

What version of phpdocx are you using?.

Regards.

Posted by andrwsv  · 11-04-2013 - 12:13

hi I have the same error...
[b]I have free version[/b]

please helpme i need put one image in the footer and other image in the footer and other image in background of the document.
how doit with this script??

and other qwestion is :
i need read other file word and create a new file word with one text in the header
if this posible?

thanks for the help

i need this for tell my boss, buy this script...

Posted by admin  · 11-04-2013 - 12:13

Hi,

You need phpdocx pro, pro+ or corporate to add images in headers and footers.
This page

http://www.phpdocx.com/documentation/features

describes all features of each version.

Regards.