Ok, so I use the following snippet to get \"views\" of HTML with PHP variables loaded in as $data so that I can do things like fill in tr\'s of dat
I have a simple code to showing page number in footer of every page of dom pdf
#footer { position: fixed; right: 0px; bottom: 10px; text-align: center;border-top: 1px solid black;}
#footer .page:after { content: counter(page, decimal); }
@page { margin: 20px 30px 40px 50px; }
above code is css code
You can change text position according to your requirement