For example Page 1 of 5
.
There's an example online of how to get teh Page 1
part but not the of 5
part. This is it:
.pagenum:before { content: "Page " counter(page); }
I'm using version 0.6 and $PAGE_NUM
and $PAGE_COUNT
does not work.
For example Page 1 of 5
.
There's an example online of how to get teh Page 1
part but not the of 5
part. This is it:
.pagenum:before { content: "Page " counter(page); }
I'm using version 0.6 and $PAGE_NUM
and $PAGE_COUNT
does not work.
See the attachment named issue121.php on this bug report. Worked for me. As I understand it you can't echo the page num but you can draw it somewhere.
http://code.google.com/p/dompdf/issues/detail?id=121
I dont know which kind of content you want to render. I got a bunch of pictures and a maximal Pictures per Site constant.
So a function gives me the site number (total/max) and then I got everything I need to start creating the pdf.
Thats how I seperate my Sites and their I also got $pages as a blade variable.
With Stylesheet:
$PAGE_COUNT
is the total number of pages.Example
Documentation
Update
If you are using an old version where this is not supported, upgrade. Otherwise, you may be out of luck.
Check you have enabled inline_pdf in dompdf.
Use this code, you can put where you like, it gets the height and width of the document and puts the page/total_pages at the bottom right.
Seen at the end of this page
Hi this is mi full code... after all the HTML put this..
Test with a simple file, then put all the relevant code with querys, etc.. etc..
By default, inline PHP is disabled for security reasons, you need to enable it yourself in dompdf_config.custom.inc.php. See here.
For now, total page count is not supported with the CSS you are using, we are planning to make it work in 0.6 final though.