• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Indesign Script. How can i get extract page number from master page?

Explorer ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Hi everyone!

I have a problem with understanding where indesign stores auto page numbering value. So, i have a master page with auto page numbering and inside script i need to extract page number value, but i couldn't find it. If i extract text frame it contains only text before page number, also i thought it is stored as a variable (for example page.masterPageItems[0].textVariableInstances), but it is empty.

Can someone advice me where i can find it?

TOPICS
Scripting

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Apr 19, 2021 Apr 19, 2021
When you want the page number, just grab the value from property page.name,
if you need to insert a marker, then just insert the marker as a symbol
SpecialCharacters.AUTO_PAGE_NUMBER

Votes

Translate

Translate
Participant ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Hi Alex

On the master spreads you can only find the page number marker and this is not a text variable! The current page number marker is the SpecialCharacters character.AUTO_PAGE_NUMBER

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Thanks for answer. So as far as i understand InDesign uses this marker  (SpecialCharacters character.AUTO_PAGE_NUMBER) to replace it with actual page number but there are no way to retrieve this value during script execution, correct?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

When you want the page number, just grab the value from property page.name,
if you need to insert a marker, then just insert the marker as a symbol
SpecialCharacters.AUTO_PAGE_NUMBER

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

LATEST

page.name always contains real formatted page number which appears on a page.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines