phpdocx library <ul> and <li> not working in docx file when <p> tag used in <li>

59 Views Asked by At

i am using phpdocx library to generate docx file from html content. it not working when <p> tag used in <li> tag. in generated docx file <ul> <li> format messed up.

nothing found for this problem

$docx = new CreateDocx();
$docx->setDefaultFont('Arial');
$wordStyles = array('<table>' => 'LightListAccent3PHPDOCX', '<h1>' => 'Heading1PHPDOCX' , '<h2>' => 'Heading2PHPDOCX' , '<h3>' => 'Heading3PHPDOCX' , '<h4>' => 'Heading4PHPDOCX' , '<h5>' => 'Heading5PHPDOCX' , '<h6>' => 'Heading6PHPDOCX');
$docx->embedHTML($htmlContent, array('strictWordStyles' => false, 'wordStyles' => $wordStyles));
$docx->createDocxAndDownload('/tmp/'.$filename);

image attached

0

There are 0 best solutions below