FPDF Header and Footer

前端 未结 1 1736
甜味超标
甜味超标 2021-01-13 22:49

I\'ve install FPDF on Laravel 4.

I use this code to try FPDF but the functions Header() and Footer() don\'t work

class PDF          


        
1条回答
  •  有刺的猬
    2021-01-13 23:36

    Write a new class which extends FPDF and put your Header & Footer methods in there.

    class PDF extends FPDF {
    
      function Header() {}
      function Footer() {}
    }
    

    Then in your controller...

    new PDF();
    

    0 讨论(0)
提交回复
热议问题