# [NTG-context] Make page number appear on top of image

Thu Oct 12 19:29:17 CEST 2006

```On Wed, 11 Oct 2006, Aditya Mahajan wrote:

> Hi,
>  I want to combine some papers into a single pdf file "with page
> numbers". I am including the papers using
>
> \copypages[filename]
>
> However, the pagenumber is not printed when the paper is a scanned
> copy. I guess this is because the page number is printed and then the
> scanned image is printed on top of it, thereby hiding the page number.
>
> How can I force the page number to appear on top?

I tried layer, and it almost works. How do I get the layer to be
evaluated at each page. I get pagenumber=1 on all pages.

\definelayer
[pagenumber]
[width=\paperwidth,height=\paperheight,state=continue]

\setupbackgrounds[page][background={foreground,pagenumber}]

\setlayer[pagenumber]
[corner={right,bottom},location={left,top},x=1cm,y=1cm]
{\tfb \getnumber[page]}

with layer state=start I get the page number on only the first page.
With state=repeat|continue I always get 1. What should I use so that
the layer is evaluated again on each page?