My code html like this :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Print PDF</title>
<style type="text/css">
.footer { position: fixed; left: 0px; right: 0px; height: 50px;text-align: center; }
.footer .pagenum:before { content: counter(page); }
</style>
</head>
<body>
<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>
<div class="footer">
<span class="pagenum"></span>
</div>
</body>
</html>
If $row = 22, it will display only 1 page like this :
If $row = 202, it will display 7 page like this ;
When there is more than 1 page, the first page does not display the page number.
But when there is only 1 page, first page displays page number
What I want is :
I want to disappear the page number when there is only 1 page
How can I do it?
by looking over the
dompdf_config.inc.php
file. As it turns out,DOMPDF_ENABLE_PHP
is set tofalse
thus causing the inline php script to be ignored. I simply editeddompdf_config.custom.inc.php
to the following and all is fine and working with the later code in theview
.In dompdf/dompdf_config.custom.inc.php
At Run Time
Then, in my html file
If you go this route, don't forget to restart Apache