May 15, 2024
0
Level 3
Inconsistent behavior regarding pdf style on production server
I have a job that generates the pdf queue database In development using sail, page break works normally however in production (two different servers one using forge one using ploi.io) it doesn't work it gets ignored I tried using tailwind css and inline css
in production
locally
also as you can see there is a difference in the font of the header and footer though that is not as important as the page break header and footer font related css
font-family: Inter, sans-serif;
font-size: 15rem;
Edit: pdf code
@php($currentDepartment = null)
@foreach($data['items'] as $asset)
@if($currentDepartment !== $asset->location->department_id)
<h1 class="text-lg font-bold w-1/2 col-span-full">{{ __('Department: ') . $asset->location->department->name }}</h1>
@php($currentDepartment = $asset->location->department_id)
@endif
<div class="bg-white shadow-md rounded-lg p-6 break-after-page"> (also tried `style="page-break-after: always;"`)
(content here)
</div>
(also tried @pageBreak here)
@endforeach
Please or to participate in this conversation.