not sure but maybe you need to assign the pagenumb...
# advancedpdf
n
not sure but maybe you need to assign the pagenumber to a variable.