Page break in Html2Pdf

后端 未结 4 581
野性不改
野性不改 2020-12-06 08:18

I am in the process of generating a dynamic pdf file, which contains data of around 10,000 users, in general the app is developed using MySQL and PHP. The dynamic content is

4条回答
  •  一个人的身影
    2020-12-06 09:01

    i just figured this out after having the same problem. the parser that they use DOES support the page-break-after tag, but the html2pdf does not work.

    i think i have it working by doing the following modifications to html2pdf.class:

    around line 4174, the first thing inside:

    protected function _tag_close_P($param){
    

    should be:

       if($this->parsingCss->value['page-break-after'] == "always")
            $this->_setNewPage();
    

    around line 2961, the first thing inside:

    protected function _tag_close_DIV($param, $other='div'){
    

    should be:

     if($this->parsingCss->value['page-break-after'] == "always")
            $this->_setNewPage();
    

提交回复
热议问题