Closed chdonncha closed 3 months ago
Using Laravel Framework 10.48.3
Currently experiencing an issue in regards to the Page numbering. Using the code mentioned in the issue: https://github.com/barryvdh/laravel-dompdf/issues/452
I'm using the following in my scripts tag:
<script type="text/php"> if (isset($pdf)) { $text = "page {PAGE_NUM} / {PAGE_COUNT}"; $size = 10; $font = $fontMetrics->getFont("Verdana"); $width = $fontMetrics->get_text_width($text, $font, $size) / 2; $x = ($pdf->get_width() - $width) / 2; $y = $pdf->get_height() - 35; $pdf->page_text($x, $y, $text, $font, $size); } </script>
Below is a screenshot of Page 1, there are 2 pages in this document and the total count appears to have a 1 and 2 overlap
On the second page however it appears correctly:
In styling I'm currently using:
<style> header { position: fixed; } </style>
If I remove the fixed position then despite having 2 pages only the first page will show:
and then the second will show no page numbering.
Fixed: <main> tag needed to be above <header> tag where this was implemented
<main>
<header>
Using Laravel Framework 10.48.3
Currently experiencing an issue in regards to the Page numbering. Using the code mentioned in the issue: https://github.com/barryvdh/laravel-dompdf/issues/452
I'm using the following in my scripts tag:
Below is a screenshot of Page 1, there are 2 pages in this document and the total count appears to have a 1 and 2 overlap
On the second page however it appears correctly:
In styling I'm currently using:
If I remove the fixed position then despite having 2 pages only the first page will show:
and then the second will show no page numbering.