ErrorException in Cpdf.php line 3855: Undefined index: at barryvdh/laravel-dompdf

后端 未结 2 2042
刺人心
刺人心 2021-01-19 18:48

I am using laravel 5.2, The dompdf runs fine at localhost but when moved to AWS it keeps showing ErrorException in Cpdf.php line 3855: Undefined index:, in this

相关标签:
2条回答
  • 2021-01-19 19:12

    I faced this issue on the Linux machine. The error shown was

    Undefined index: application/third_party/dompdf/lib/fonts\Times-Roman

    If you observe the Directory separator before the font name '\' is not compatible in Linux environment. This path separator is hardcoded in the dompdf_font_family_cache.php file found in ../dompdf/lib/fonts folder.

    Open the file in the editor and replace '\' with '/'. Save the changes. The code will start working.

    0 讨论(0)
  • 2021-01-19 19:22

    Error solved by delete dompdf_font_family_cache.php file from storage/fonts and let the renderer regenerate the cache.

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