I installed the dompdf package in laravel4, using composer. However, it is giving the following error when trying to create the object:
Use of undefined constant DOMPDF_TEMP_DIR – assumed 'DOMPDF_TEMP_DIR'
The php being used is 5.3.10, laravel 4.0.10
$pdf = new DOMPDF();
dompdf definitions file code:
Even with changing this definition or including by
include , the error persists.
Does anyone know the reason for the error or have you experienced this problem?
From what I've read in the documentation, you should require the DOMPDF configuration file, before instantiating the object.
I recommend putting it in the /app/start/global.php file