-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Describe the bug and add attachments
Here is my code in which I'm trying to add a title using the setComplexBlock function
$templateProcessor = new TemplateProcessor($documentModelPath);
$title = new Title("Title 1", 1);
$title->setPhpWord(new PhpWord());
$templateProcessor->setComplexBlock("title", $title);
$templateProcessor->saveAs($outputFile);
With my word templace containing a simple page
Result is the text is replaced but as Normal text not title.
Also I needed to add the line $title->setPhpWord(new PhpWord())
to avoir the following error :
Call to a member function addBookmark() on null
If I missused the library or if there is any workaroung please let me know.
Thank you !
Expected behavior
I would expect the title to match the required depth and style and to be a real Word title that could be used is summary table, etc.
Steps to reproduce
$templateProcessor = new TemplateProcessor($documentModelPath);
$title = new Title("Title 1", 1);
$title->setPhpWord(new PhpWord());
$templateProcessor->setComplexBlock("title", $title);
$templateProcessor->saveAs($outputFile);
PHPWord version(s) where the bug happened
1.3.0
PHP version(s) where the bug happened
8.2
Priority
- I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
- I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)