I'm using laravel-dompdf package for generating pdf.
I could draw a diagonal line using rotate
of the CSS.
As you can see, my document have a lot of diagonal lines, so I want to draw a line with scripts.
Controller
public function downloadPDF () {
$pdf = PDF::loadView('test', [
'users' => $users //$users is array
])->setPaper('a4', 'portrait');
return $pdf->download("test.pdf");
}
View(test.blade.php)
<!DOCTYPE html>
<html>
...
<body>
<table>
<tbody>
<tr>
<th>{{-- Draw diagonal line here --}}</th>
<th>Name</th>
<th>TEL</th>
</tr>
@foreach($users as $key=>$user)
<tr>
<td>{{ $key }}</td>
<td>{{ $user['name'] }}</td>
<td>{{ $user['tel'] }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>
How can draw diagonal lines with script?