Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

Community Beginner ,
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

141

Likes

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

Explorer , 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

Likes

Translate

Translate
Explorer ,
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

Likes

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
Community Beginner ,
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?

Likes

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

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

Likes

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
Community Beginner ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

Thanks!

Likes

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

LATEST

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

 

Likes

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