Skip to main content
Inspiring
September 8, 2015
Answered

How do you access the page number of a page?

  • September 8, 2015
  • 1 reply
  • 480 views

I have spent hours on the jongware site trying to figure this out. Can someone give an assist?

This topic has been closed for replies.
Correct answer TᴀW

It depends what you mean by page number. There are 2 options: (a) the physical number of the page, counting the first page as 0; (b) the name of the page (e.g. page xii, etc).

To get the physical number of the page, given myPage as a Page object:

myPage.documentOffset

To get the name of the page:

myPage.name

1 reply

TᴀW
TᴀWCorrect answer
Legend
September 8, 2015

It depends what you mean by page number. There are 2 options: (a) the physical number of the page, counting the first page as 0; (b) the name of the page (e.g. page xii, etc).

To get the physical number of the page, given myPage as a Page object:

myPage.documentOffset

To get the name of the page:

myPage.name

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators
Inspiring
September 8, 2015

I need the physical number. I'm confirming this works. Thanks!