我正在使用mPDF库从HTML页面生成PDF文件.它在firefox中工作得很好,但它不是在chrome浏览器中显示PDF文件.
我在chrome中生成PDF时出现以下错误.
以下是我使用mPDF生成PDF的代码
ob_clean();
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $yourFileName . '"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
$mpdf = new PDF( 'c','A4','','',15, 15,10,14,0,0);
$mpdf->useOnlyCoreFonts = false;
$mpdf->SetDisplayMode('real');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$stylesheet = file_get_contents(APPPATH . 'third_party/mpdf/style.css');
$mpdf->WriteHTML($stylesheet,1);
$mpdf->WriteHTML($html);
$mpdf->Output();
Run Code Online (Sandbox Code Playgroud) 我是使用Laravel 5进行Web开发的新手.我安装了asGgardCMS,在看到asgardCms代码后,我发现app/Http/route.php文件中没有任何代码,路由所需的代码放在模块代码中.例如,路由菜单管理器模块的必需代码放在Modules/Media/apiRoutes.php和Modules/Media/backendRoutes.php文件中.可以帮助我,告诉我如何管理我的路线?