protected function buildHtmlMessage(Html2PdfException $e, $data)
    {
        $this->htmlMessage = '<span style="color: #A00; font-weight: bold;">';
        $this->htmlMessage.= 'Html2Pdf Error ['.$e->getCode().']';
        $this->htmlMessage.= '</span><br />'."\n";
        $this->htmlMessage.= htmlentities($e->getMessage())."<br />\n";
        $this->htmlMessage.= ' File: '.$e->getFile()."<br />\n";
        $this->htmlMessage.= ' Line: '.$e->getLine()."<br />\n";

        if (!empty($data)) {
            foreach ($data as $key => $value) {
                $this->htmlMessage .= ' '.ucwords($key).': '.trim(htmlentities($value))."<br />\n";
            }
        }
    }