Forum


Replies: 9   Views: 1820
How to use the streammode?
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 pwctechnicalsecurity  · 02-04-2021 - 08:11

public function debug(Request $request)
{

    \Phpdocx\Create\CreateDocx::$returnDocxStructure = true;
    $queue = array();
    $docx = new \Phpdocx\Create\CreateDocxFromTemplate('/patth_to/vendor/phpdocx/examples/files/headings.docx');
    $queue[] = $docx->createDocx();
    \Phpdocx\Create\CreateDocx::$returnDocxStructure = false;
    \Phpdocx\Create\CreateDocx::$streamMode = true;
    $merge = new \Phpdocx\Utilities\MultiMerge();
    $merge->mergeDocx($queue[0], array(), 'example.docx', array());

Using your own DocX as template, it still results in the first issue (unreadable content recovery), not in the second "Show Repairs" dialog box ("Styles 1"-comment).