Reputation: 11
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);
Upvotes: 0
Views: 66