PHP code example of programic / html2docx

1. Go to this page and download the library: Download programic/html2docx library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

programic / html2docx example snippets




use Programic\Html2Docx\Docx;

$docx = new Docx($settings);
$docx->setContent($content);
$docx->save($location, $writerInterface='Word2007');