我使用Jonathan Thuau的Dompdf package for Laravel 4 每当我尝试生成9个以上的gape时,我都会收到服务器错误,否则它会起作用。
下面也是我的配置文件,如果我必须更改
中的任何内容,请告诉我return array(
'DOMPDF_TEMP_DIR' => sys_get_temp_dir(),
'DOMPDF_UNICODE_ENABLED' => true,
'DOMPDF_PDF_BACKEND' => 'CPDF',
'DOMPDF_DEFAULT_MEDIA_TYPE' => 'screen',
'DOMPDF_DEFAULT_PAPER_SIZE' => 'letter',
'DOMPDF_DEFAULT_FONT' => 'serif',
'DOMPDF_DPI' => 96,
'DOMPDF_ENABLE_PHP' => false,
'DOMPDF_ENABLE_REMOTE' => false,
'DOMPDF_ENABLE_CSS_FLOAT' => false,
'DOMPDF_ENABLE_JAVASCRIPT' => true,
'DEBUGPNG' => false,
'DEBUGKEEPTEMP' => false,
'DEBUGCSS' => false,
'DEBUG_LAYOUT' => false,
'DEBUG_LAYOUT_LINES' => true,
'DEBUG_LAYOUT_BLOCKS' => true,
'DEBUG_LAYOUT_INLINE' => true,
'DOMPDF_FONT_HEIGHT_RATIO' => 1.1,
'DEBUG_LAYOUT_PADDINGBOX' => true,
'DOMPDF_ENABLE_HTML5PARSER' => false,
'DOMPDF_ENABLE_FONTSUBSETTING' => false,
'DOMPDF_ADMIN_USERNAME' => 'user',
'DOMPDF_ADMIN_PASSWORD' => 'password',
);
答案 0 :(得分:0)
错误是由于资源耗尽而我必须在页面顶部添加以下行并且它有效
set_time_limit(0);
ini_set("memory_limit",-1);
ini_set('max_execution_time', 0);