You can, given a lot of knowledge about internal Ghostscript PDF interpreters, access page numbers. This will require a lot of attention in the files Resource / Init / pdf * .ps (mostly just pdf_main.ps) and an understanding of PostScript, but it is possible. Just not for the faint of heart.
To see an example of a PS program that is viewed inside PDF for information, look at toolbin / pdf_info.ps.
If someone comes up with a patch to allow FirstPage / LastPage to take names as labels, then we will consider this. Part of this patch should be a change, add the pdf_info.ps option to print labels and real page numbers.
source share