dompdf fails to load

后端 未结 7 708
谎友^
谎友^ 2020-12-29 03:23

I am trying to get dompdf running on an in-house server. With the default config.inc.php settings, I get the following when running the equivalent of the demo \'Hello Wolrd\

7条回答
  •  温柔的废话
    2020-12-29 03:59

    I had almost the exact same problem. My code was working on my local dev machine - a Windows box - but then was failing on our production server - a Linux box

    The problem was that the "classes" directory was lower case (\app\Vendor\dompdf\lib\php-font-lib\classes) which windows did not mind - but Linux being case-sensitive did!

    Simply editing the following line in dompdf_config.inc.php solved the problem:

    require_once(DOMPDF_LIB_DIR . "/php-font-lib/Classes/Font.php");
    

    For consistency I renamed the directory with an uppercase "C" on the Windows box.

提交回复
热议问题