How can I not display page number = 1 in pdf ? (hmtl css)

前端 未结 1 1366
渐次进展
渐次进展 2021-01-24 12:24

My code html like this :



    
        

        
1条回答
  •  囚心锁ツ
    2021-01-24 12:47

    Update Regarding changes with version of dompdf >= 0.7.0

    1. Because the dompdf_config.inc.php file has been removed from this release (and is no longer referenced) all dompdf options should be set at run time.

    2. The FontMetrics class is now instantiated instead of static. To simplify migration of embedded scripts from earlier versions of dompdf we provide access to the instantiated FontMetrics class via the $fontMetrics variable. Please update your embedded scripts. For example, FontMetrics::get_font('helvetica') would now be $fontMetrics->getFont('helvetica').

    ~ Thanks to Dennis Ameling's answer for the updated information.

    by looking over the dompdf_config.inc.php file. As it turns out, DOMPDF_ENABLE_PHP is set to false thus causing the inline php script to be ignored. I simply edited dompdf_config.custom.inc.php to the following and all is fine and working with the later code in the view.

    In dompdf/dompdf_config.custom.inc.php

    At Run Time

    $dompdf->set_option("isPhpEnabled", true);
    

    Then, in my html file

    
        
        

    If you go this route, don't forget to restart Apache

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