我正在使用barryvdh/laravel-domPDF并发现了错误。
调用null上的成员函数get_cellmap()
我使用的是Laravel8.42.1和PHP8.0.3。
<div>
<div class="md:grid md:grid-cols-3 md:gap-6">
<div class="mt-5 md:mt-0 md:col-span-2">
<form action="#" method="POST">
<div class="shadow sm:rounded-md sm:overflow-hidden">
<div class="px-4 py-5 bg-white space-y-6 sm:p-6">
<div class="grid grid-cols-2 gap-2">
<div class="content-evenly">
PRIVATE AND CONFIDENTIAL
</div>
<div class="content-evenly col-span-1 sm:col-span-2 border-solid border-4 border-light-blue-500">
<div class="employee float-right m-10 text-sm font-medium text-gray-700">
@foreach($teams as $team)
<tr>
<th>
{{$team->companyName}}
</th><br>
<th>
{{$team->street}}
</th><br>
<th>
{{$team->compound}}
</th><br>
<th>
{{$team->suburb}}
</th>
</tr>
@endforeach
@foreach($employees as $employee)
</div>
<div class="employee float-left m-10 text-sm font-medium text-gray-700 ">
<tr>
<th>
{{$employee->name}} {{$employee->surname}}
</th><br>
<th>
{{$employee->role}}
</th><br>
<th>
{{$employee->idNumber}}
</th>
<th>
{{$employee->phone}}
</th>
</tr>
@endforeach
</div>
</div>
</div>
</form>
</div>
</div>
</div> 发布于 2022-10-18 21:27:37
计算样式也可能导致该问题,在我的情况下,显示:表标签上的块导致了问题。
发布于 2021-05-27 18:17:16
我认为问题是在html结构中,dompdf有一些限制,例如,有些标记不受支持。我认为您应该只在标题中使用表标记,th,tbody,tr:如果您想阅读更多关于限制的内容,就应该使用链接:https://github.com/dompdf/dompdf#user-content-limitations-known-issues。
https://stackoverflow.com/questions/67725762
复制相似问题