2017-02-13 5 views
0

여기에서 얻을 수 있습니다 : https://github.com/barryvdh/laravel-dompdf왜 laravel-dompdf가 PHP 7.1에서 작동하지 않습니까?

Previous, 나는 PHP 7.0.8을 사용합니다. 내 PDF 나는 PHP 7.1을 사용하는 경우

, 내 PDF가 존재 오류없이 오류

내 컨트롤러 아래 참조 다음과 같이이다 :

public function listdata(Request $request) 
{ 
    ... 
    $pdf = PDF::loadView('test_print.test', ['data' => $data]); 
    $pdf->setPaper('legal', 'landscape'); 
    return $pdf->stream('test_print.test'); 
} 

내 PDF보기는 다음과 같이이다 :

<h1>This is test</h1> 

<table class="tg"> 
    <tr> 
     <th class="tg-3wr7">kolom 1</th> 
     <th class="tg-3wr7">kolom 2</th> 
     <th class="tg-3wr7">kolom 3</th> 
     <th class="tg-3wr7">kolom 4</th> 
     <th class="tg-3wr7">kolom 5</th> 
    </tr> 
    @php ($row = 22) 
    @for($i=0;$i<$row;$i++) 
    <tr> 
     <td class="tg-rv4w">test 1</td> 
     <td class="tg-rv4w">test 1</td> 
     <td class="tg-rv4w">test 1</td> 
     <td class="tg-rv4w">test 1</td> 
     <td class="tg-rv4w">test 1</td> 
    </tr> 
    @endfor 
</table> 

<br> 
<!-- start position signature --> 
<div class="signature"> 
    London,&nbsp;8 January 2017<br> 
    Chelsea Player<br><br><br><br> 
    Eden Hazard<br> 
</div> 
<!-- end position signature --> 

실행하면 다음과 같은 오류가 발생합니다.

012 Page.php 라인 (494)에 3,516,

1/1 ErrorException : laravel-DOMPDF이 디 PHP 7.1 작동하지 않는 이유는 숫자가 아닌 값 은

가 발생?

답변

3

PHP 7.1.0과 Dompdf 0.7.0 및 이전 버전간에 알려진 비 호환성이 있습니다. issue #1272을 참조하십시오. 2016 년 2 월 15 일에 발표 된 Dompdf 0.8.0은 이러한 문제를 해결합니다.

+0

나는 laravel-dompdf를 사용합니다. dompdf가 없습니다. 다른 것으로 보입니다 –

+0

@mosestoh 그것은 다르지 않습니다. 패키지는 단지'dompdf'를 프레임 워크에 통합하는 방법 일뿐입니다. 필요한 경우 더 명확히하기 위해 [Laravel News] (https://laravel-news.com/cashier-dompdf)를 참조하십시오. – camelCase

+1

@camelCase, Ok. 결론은 업데이트가있을 때까지 기다려야한다는 결론을 의미합니까? –