How to get page number on dompdf PDF when using “view”

前端 未结 5 1501
南笙
南笙 2020-11-30 11:49

Ok, so I use the following snippet to get \"views\" of HTML with PHP variables loaded in as $data so that I can do things like fill in tr\'s of dat

5条回答
  •  余生分开走
    2020-11-30 12:32

    First you must enable executing inline php scripts in dompdf_config.inc.php file. (change define("DOMPDF_ENABLE_PHP", true); this line to true)

    This code sets Page indicator in right corner of the header...

         
    

    Be sure that script tag is within body tag... otherwise it doesn't work!

提交回复
热议问题