Forum How do I...?

counter-reset on blank page

fsurjana
Is there a way to do counter-reset on blank page?
#superlongpage {  content: counter(pages); }

@page tearaway:blank {
	margin:0px;
        counter-reset: pages; 
        content: string(" ");
	@top { content:normal;}
	@bottom { content: normal;}
}

#tearawaypage { page:tearaway; counter-reset: pages; page-break-before:right; }

<div id="superlongpage">...</div>
<div id="tearawaypage">...</div>


This will give me:
superlongpage: Total pages 28
Instead of:
superlongpage: Total pages 27

For some reason the blank page that is created due to page-break-before:right counts towards total page count.
mikeday
It may not be possible to do this just with counters, it may require some JavaScript manipulation via prince-script() functions.
fsurjana
alright, thanks for the fast response!