fixing pagenumber

This commit is contained in:
KhatamNugraha
2024-04-18 17:43:01 +07:00
parent b7dd8991ed
commit a83687692a
2 changed files with 250 additions and 248 deletions

View File

@ -474,9 +474,17 @@
$pages = array_filter($objects, function($v) {
return $v['t'] == 'page';
});
$number = 1;
$no = 0;
$noSurat = $infoSuratNew['no_surat'] ;
foreach($pages as $pageId => $page) {
$nos = $page['info']['pageNum'];
$canvas->reopen_object($pageId + 1);
$canvas->text(502, 780, "Page : ". $nos, $font, 10, array(0,0,0));
$canvas->close_object();
$number++;
if(($pageId + 1) !== $firstPageId) {
$canvas->reopen_object($pageId + 1);
$canvas->text(350, 50, "Lanjutan Surat No : $noSurat", $font, 10, array(0,0,0));

View File

@ -54,15 +54,14 @@
}
.footer {
width: 100%;
text-align: center;
#footer {
position: fixed;
margin-top: 1cm;
top: 23cm;
font-size: 12px;
left: 20px;
bottom: 0;
text-align: center;
}
#footer .page:after {
content: counter(page);
}
/* .header {
@ -72,7 +71,7 @@
left: 0px;
right: 0px;
height: 50px;
font-size: 20px !important;
font-size: 20px !important;dsdas
background-color: #000;
color: white;
text-align: center;
@ -83,14 +82,14 @@
/* body:nth-child(1) .header {
display: none;
} */
/*
.pagenum:before {
content: counter(page);
}
} */
.flyleaf {
/* .flyleaf {
page-break-after: always;
}
} */
@ -98,7 +97,7 @@
</head>
<body>
<main>
<ul class="no-bullets">
<li>Nomor &nbsp; : {{$data['infoSuratNew']['no_surat']}}</li>
<li>Tanggal : {{ $data['today'] }}</li>
@ -231,10 +230,6 @@
@endif
</tbody>
</table><br>
<ul class="no-bullets" style="page-break-inside: avoid;">
<li>FASILITAS LAIN YANG DITERIMA OLEH NASABAH</li>
<li>POSISI : {{ $data['batchDate'] }} </li>
@ -346,9 +341,8 @@
</tr>
</table>
</div>
<div class="footer">
Page <span class="pagenum" style="margin-top:100px"></span>
</div>
</main>
</body>
</html>