Forum


Replies: 3   Views: 693
Get header/footer content as plain text
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 bilalhh86  · 26-08-2022 - 12:08

Thanks,

i use it like this to get text like the one i get it from the body

$docx = new \Phpdocx\Create\CreateDocxFromTemplate($documentPath);
$headerText = implode(' ', $docx->getWordContents(['target' => 'header']));

i get the data, is that correct?