Based on the work of macdabby (which does not work). But thanks to him, the idea is correct.
Html2Pdf v4.03
For example, we want to parse a DIV tag:
html2pdf.class.php line 2948:
protected function _tag_close_DIV($param, $other='div') { if ($this->parsingCss->value['page-break-after'] == "always") $this->_setNewPage(null, '', null, $this->_defaultTop); $this->parsingCss->setPosition(); ... }
parsingCss.class.php Line 114:
//add a new style declaration public function initStyle() { ... $this->value['page-break-after'] = null; }
Line 1024 adds a new handler to the switch enclosure:
case 'page-break-after': $this->value[$nom] = $val; break;
And then for it to work, your html content must contain a break element
<div style="page-break-after:always; clear:both"></div>
Watch out for case sensitive style, not sure if the plugin handles it
source share