Forum


Replies: 6   Views: 3795
Importheadersandfooters() getting error
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 sreekumar  · 15-03-2013 - 11:09

hi all

i started working in phpdocx.

but now when i am trying to add footer, it shows an error message.


"Fatal error: Call to undefined method CreateDocx::importHeadersAndFooters() in C:\xampp\htdocs\phpdocx_demo\p1.php on line 5"


this is my code



<?php
require_once("C:/xampp/htdocs/phpdocx_demo/phpdocx_free/classes/CreateDocx.inc");
$docx = new CreateDocx();
$docx ->importHeadersAndFooters('C:/xampp/htdocs/phpdocx_demo/templateHeaderAndFooter.docx', 'footer');

// templateHeaderAndFooter.docx file contains one line, which should come as footer

$text ="welcome home";
$docx->addText($text);

$docx->createDocx('C:/xampp/htdocs/phpdocx_demo/hello_world_3');
?>

what to do

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

Hello,

importHeadersAndFooters is only supported in PHPDOCX PRO, PRO+ and CORPORATE. You have all features here:

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

Regards.

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

is there any other way to add header and footer to my docx file.

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

Hello,

You can use addHeader and addFooter methods. Please read phpdoc included in PHPDocX Free and included examples.

Regards.

Posted by garethellis36  · 23-01-2014 - 15:42

addHeader and addFooter are not included in community version either, correct?


Posted by jorgelj  · 24-01-2014 - 07:55

Hello,



The current version of PHPDocX Community doesn't include these methods. You can add texts, lists, tables, charts and images.



Regards.