PDF numbering to reflect document page number

As promised, I wrote a first iteration of a script: