Hi,
We use your library to convert HTML to Word documents. On some documents, we see the error :
ErrorException {#159166
  #message: "Undefined index: border_top_width"
  #code: 0
  #file: "/home/vagrant/code/packages/phpdocx/Classes/Phpdocx/Transform/HTML2WordML.php"
  #line: 2197
  #severity: E_NOTICE
  trace: {
    /home/vagrant/code/packages/phpdocx/Classes/Phpdocx/Transform/HTML2WordML.php:2197 {
      Phpdocx\Transform\HTML2WordML->generateTblPr($properties, $attributes)
      › foreach (self::$borders as $key => $value) {
      ›     if (isset($properties['border_' . $value . '_style']) && $properties['border_' . $value . '_color'] != 'none' && $properties['border_' . $value . '_width'] != null) {
      ›         $stringTblPr .= '<w:' . $value . ' w:val="' . $this->getBorderStyles($properties['border_' . $value . '_style']) . '"  w:color="' . $this->wordMLColor($properties['border_' . $value . '_color']) . '" w:sz="' . $this->wordMLLineWidth(isset($properties['border_' . $value . '_width']) ? $properties['border_' . $value . '_width'] : '') . '" />';
    }
    /home/vagrant/code/packages/phpdocx/Classes/Phpdocx/Transform/HTML2WordML.php:975 { …}
    /home/vagrant/code/packages/phpdocx/Classes/Phpdocx/Transform/HTML2WordML.php:1622 { …}Do you have any hint? I can send the HTML code to a confidential email if needed.
Here is how we create the document:
$docx = new CreateDocx();
$docx->embedHTML(file_get_contents($htmlFile));
$docx->removeHeadersAndFooters();
$docx->createDocx($wordFile);Regards,
 
                 Log in
                                    Log in
                                 Contact
                                Contact
                             Forum
                                Forum