1
マイコントローラは次のようである:より動的になるように署名の位置を調整するにはどうすればいいですか(laravel dompdf)?
public function listdata(Request $request)
{
...
$pdf = PDF::loadView('test_print.test', ['data' => $data]);
$pdf->setPaper('legal', 'landscape');
return $pdf->stream('test_print.test');
}
マイPDFビューは次のようである:
<h1>This is test</h1>
<table class="tg">
<tr>
<th class="tg-3wr7">kolom 1</th>
<th class="tg-3wr7">kolom 2</th>
<th class="tg-3wr7">kolom 3</th>
<th class="tg-3wr7">kolom 4</th>
<th class="tg-3wr7">kolom 5</th>
</tr>
@php ($row = 22)
@for($i=0;$i<$row;$i++)
<tr>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
</tr>
@endfor
</table>
<br>
<!-- start position signature -->
<div class="signature">
London, 8 January 2017<br>
Chelsea Player<br><br><br><br>
Eden Hazard<br>
</div>
<!-- end position signature -->
それは2の別々の署名のコンテンツを探し1ページ目、2ページ目です。
どうすればいいですか?
私のデータは動的です。データを変更した場合'$ row = 10'です。次のようになります:http://postimg.org/image/8x25gthqf/ページ1に署名を配置する必要があります –
あなたが言っていることは、次のページにしか表示したくないという場合は、 'page-break-inside:avoid;で"署名 "クラスをスタイリングしてみてください。 – BrianS
@BrianS、できます。ありがとう –