Abhay Pai - 2017-03-15 11:07:38
Below is my testing code from the examples
require_once '/vsword/VsWord.php';
VsWord::autoLoad();
$doc = new VsWord();
$parser = new HtmlParser($doc);
$parser->parse( '<h1>Hello world!</h1>' );
$parser->parse( '<h3>Hello world!</h3>' );
$parser->parse( '<p>Hello world!</p>' );
$parser->parse( '<h2>Header table</h2> <table> <tr><td>Coll 1</td><td>Coll 2</td></tr> </table>' );
$html = '<p align="right">Some more text ... More text about... Some more text ... More text about... Some more text ... More text about...</p>';
$html .= '<p align="left">Some more text ... More text about... Some more text ... More text about... Some more text ... More text about...</p>';
$html .= '<p align="center">Some more text ... More text about... Some more text ... More text about... Some more text ... More text about...</p>';
$html .= '<p align"justify">Some more text ... More text about... Some more text ... More text about... Some more text ... More text about...</p>';
$parser->parse($html);
$doc->saveAs( 'doc-created/test.doc' );