Reputation: 328
I would like to know how set DOMPDF library (https://github.com/dompdf/dompdf) to start paging from given value?
Default behavior: starts at 1
Wanted behavior: start at let's say 3
Upvotes: 0
Views: 1555
Reputation: 13914
Use CSS and increment the page counter. So long as your increment element appears before you insert the page number this will work:
<html>
<head>
<style>
.move-ahead { counter-increment: page 2; position: absolute; visibility: hidden; }
.pagenum:after { content:' ' counter(page); }
</style>
</head>
<body>
<div class="move-ahead"></div>
<p class="pagenum">Page</p>
</body>
</html>
Upvotes: 2