I'm using PHPWord, and I have an error with cloneBlock() function at a TemplateProcessor.
I wrap a table and a pagebreak into ${cloneme} ... ${/cloneme}. If i use this, it works well :
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('template.docx');
$templateProcessor->cloneBlock('CLONEME', $nbjour-1);
I can have as many pages as days. My problem is, if I want to put text after the ${/cloneme}, I got a .docx file with only one table, not duplicated, and still the ${cloneme}...${/cloneme} tags written.
But it's not just "text". If I wrote 5 lines, it will duplicate. If I wrote 7, it'll bug. Same thing with a table (still after the ${/cloneme}). 6 rows are ok, but 8 will bug.
I'm tilted, someone can figure out where I'm wrong?
I give you 2 images, first one working, second none.
Working : Not working :