DOMPDF Laravel 5包装器,它是一个用于Laravel 5的html转pdf转换器。
我尝试将laravel默认的auth注册页面转换为PDF,路径为http://www.careertag.dev/auth/register。用于此目的的代码如下所示。但我遇到了字体问题。请问您能否帮我解决这个问题?
routes.php
Route::post('/screenshot', function(){
$pdf = App::make('dompdf.wrapper');
//$pdf->loadHTML('<h1>Test</h1>');
$view = View::make('auth.register')->render();
$pdf->loadHTML($view);
$pdf->stream();
//return $pdf->stream('invoice');
return $pdf->download('profile.pdf');
});
错误
ErrorException in font_metrics.cls.php line 343: file_put_contents(C:\xampp\htdocs\careertag\storage\fonts/13350985545a9988387f8a573f409063.ttf): failed to open stream: No such file or directory