templateprocessor cloneblock is not working

I’m using the library “templateprocessor” from phpoffice, but I have a problem with the method “cloneblock”.
When I call this method, it’s appending something at the end of my docx file, but not in the proper way, so I have:

"Unspecified error" in Part:/word/document.xml, line:2, column:0.

The code it’s pretty easy, I’m following the example on github:

$templateProcessor = new TemplateProcessor($mytemplate);
$templateProcessor->cloneBlock('CLONEME', 3);
$templateProcessor->saveAs($saveFolder);

If instead of use saveAs I use save() it return an zip close() error, but I’m not sure what this means.
Could please someone help me? Thank you


Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.