I am doing a procedure, where (simply put), I follow the example as outlined in phpdocx/examples/DocxUtilities/mergeDocx/sample_2.php.
Roughly:
CreateDocx::$returnDocxStructure = true;
$docx = new CreateDocxFromTemplate($manifest->canvas->word_file_path);
Simple operations (generally adding sequences through EmbedHTML). The DocX is pushed into an array.
Above two steps are done two more times.
// Compose Word document from queue $first = $queue->shift(); $merge = new MultiMerge(); CreateDocx::$streamMode = true; return $merge->mergeDocx($first, $queue->toArray(), 'docs/example.docx', array('mergeType' => 0));
In case I set CreateDocx::$streamMode = true; I get the following issues when opening Word. In case I don't set streamMode, there are no issues. Any suggestions?
Word found unreadable content in "docs_example (2).docx". Do you want to recover the contents of this document? If you trust the source of this document, click Yes.
When clicking Yes, I get another dialog box that shows the repairs:
Word detected and repaired the following errors. To view each repair, select it in the list, then click Go To. Save the document to make the repairs permanent.
A listbox that shows "Styles1"
If I want to view the repair, by clicking Go To, it states: This bookmark does not exist.