PHP Classes

Unable to output docx

Recommend this page to a friend!

      VS PHP Word HTML  >  All threads  >  Unable to output docx  >  (Un) Subscribe thread alerts  
Subject:Unable to output docx
Summary:Unable to output docx
Messages:2
Author:YR
Date:2016-08-07 12:32:38
 

  1. Unable to output docx   Reply   Report abuse  
Picture of YR YR - 2016-08-07 12:32:38
Hi, here is my code:

require_once '/vsword/VsWord.php';
VsWord::autoLoad();
$doc=new VsWord();
$parser = new HtmlParser($doc);
$content = ets_docMonthlyReportTemplate();
$html= $content;
$parser->parse($html);
echo '<pre>'.($doc->getDocument()->getBody()->look()).'</pre>';
$doc->saveAs('./report.docx');

After dl and open the docx, it told me found a problem in contents and xml parsing error.But actually I can't find my word/document.xml location.

Can you help?
Thanks.

  2. Re: Unable to output docx   Reply   Report abuse  
Picture of Raskin Veniamin Raskin Veniamin - 2016-08-09 14:18:25 - In reply to message 1 from YR
Hello

Maybe this can be helpful https://github.com/vench/vsword/issues/4

>>>>>>>>>>>>>
Hi, here is my code:

require_once '/vsword/VsWord.php';
VsWord::autoLoad();
$doc=new VsWord();
$parser = new HtmlParser($doc);
$content = ets_docMonthlyReportTemplate();
$html= $content;
$parser->parse($html);
echo '<pre>'.($doc->getDocument()->getBody()->look()).'</pre>';
$doc->saveAs('./report.docx');

After dl and open the docx, it told me found a problem in contents and xml parsing error.But actually I can't find my word/document.xml location.

Can you help?
Thanks.