<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <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>Asset Report</h1><br><br><br> <br><br><br> </header> <table> <thead> <tr> <th>Asset ID</th> <th>Type</th> <th>Details</th> <th>User</th> <th>Status</th> <th>Location</th> <th>Start Date</th> <th>End Date</th> <th>Remarks</th> <th>Created At</th> <th>Updated At</th> </tr> </thead> <tbody> @foreach($history as $entry) <tr> <td>{{ $entry->asset_id }}</td> <td>{{ $entry->type_label }}</td> <td>{{ $entry->details ?? 'N/A' }}</td> <td>{{ $entry->username }}</td> <td>{{ $entry->status }}</td> <td>{{ $entry->location }}</td> <td>{{ $entry->start_date ?? 'N/A' }}</td> <td>{{ $entry->end_date ?? 'N/A' }}</td> <td>{{ $entry->remarks }}</td> <td>{{ $entry->created_at }}</td> <td>{{ $entry->updated_at }}</td> </tr> @endforeach </tbody> </table> </body> </html>