<!DOCTYPE html> <html> <head> <title>Asset Report</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; width: 100%; font-size: 8pt; /* Set global font size */ } @page { size: A4; margin: 15mm; /* Set margins to ensure content fits well */ } header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; } .logo { width: 80px; /* Adjust the logo size */ height: auto; } h1 { text-align: center; font-size: 16pt; /* Set font size for the title */ margin-bottom: 20px; flex: 1; /* Ensure the title takes available space */ } table { width: 100%; border-collapse: collapse; table-layout: fixed; /* Ensures table columns are fixed and fit the page */ margin: 20px 0; } th, td { border: 1px solid #ddd; padding: 5px; /* Adjust padding to fit more content */ text-align: left; font-size: 8pt; /* Set font size for table content */ word-wrap: break-word; /* Ensure long text in cells wraps */ } th { background-color: #f2f2f2; text-align: center; font-size: 9pt; /* Set font size for header */ } td { text-align: center; } /* Optional: Reduce the spacing for the table */ tr { page-break-inside: avoid; /* Prevent page breaks inside the table */ } </style> </head> <body> <header> <img src="{{ public_path('/images/care22.png') }}" alt="Company Logo" class="logo"> <h1>{{ $title }}</h1> <br><br><br> </header> <h1></h1> <table> <thead> <tr> <th>Id</th> <th>ITEM</th> <th>SERIAL NO</th> <th>ASSET TAG</th> <th>REMARKS</th> <th>STATUS</th> <th>LOCATION</th> </tr> </thead> <tbody> @foreach ($assets as $asset) <tr> <td>{{$asset->id}}</td> <td>{{$asset->item}}</td> <td>{{$asset->serial_no}}</td> <td>{{$asset->assetTag}}</td> <td>{{$asset->remarks}}</td> <td>{{$asset->status}}</td> <td>{{$asset->location}}</td> </tr> @endforeach </tbody> </table> </body> </html>