TCPDF: HTML table and page breaks

后端 未结 8 1356
刺人心
刺人心 2021-01-31 04:04

I am creating a large HTML table and I have problem with page breaks as you can see in the following image:

Is there a method settle down the problem automatically? Or

8条回答
  •  执念已碎
    2021-01-31 04:43

    I had the same problem with overlapping headers. I tried yevgeny solution, but that required some more editions to my PDF generator code (I have lots of PDFs outputs written in FPDF and I wanted to minimize the process of miograting them to TCPDF), so I used this more simple solution

    class MYPDF extenfs TCPDF {
        //your initialization code
        function header(){
            //your code here
    
            //we change only the top margin and this executes for every header in every page, even the frst one
            $this->SetTopMargin($this->GetY());
        }
    }
    

提交回复
热议问题