I've tried to play around with @page
and counter(page)
features of CSS3, but I can't see any page numbers added to the print output. No matter what I do, looks like this is simply not working.
My scaffold looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
@page {
counter-increment: page;
counter-reset: page 1;
@top-right {
content: "Page " counter(page) " of " counter(pages);
}
}
</style>
<head>
<body>
<div>
Lorem ipsum dolor...
/* this gets long, 2 pages of text */
</div>
</body>
</html>
The way I'm testing this out is that I'm opening the page in the browser, printing it to a PDF file and finally I'm verifying the contents. In different browsers the output is a bit different, but nowhere I can see proper page numbers.
OS: Linux Mint
Browsers: Chromium 25.0.1364.160, Firefox 20.0.1, Opera (latest from package manager)
Any ideas?