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

Page number on which the Spread is located

Participant ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

Hi

How can i get page number on witch the spread is located

Thanks

TOPICS
Scripting

Views

341

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 , Mar 29, 2017 Mar 29, 2017

In InDesign CS 5.5 i use

spread.parentPage.name

Votes

Translate

Translate
Community Expert ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

Hi Robert,

spreads are on top of the hierarchie.

Do you perhaps mean what pages a spread consist of?

For the active spread of a document this is:

app.documents[0].layoutWindows[0].activeSpread.pages.everyItem().documentOffset;

That will return an array of zero-based number(s). / Integers

If you want to get the page names use:

app.documents[0].layoutWindows[0].activeSpread.pages.everyItem().name;

That will return an array of page name(s) / Strings

For DOM documentation see what Gregor Fellenz has compiled for InDesign CC 2017:

InDesign ExtendScript API (12.0)

Regards,
Uwe

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 ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

In InDesign CS 5.5 i use

spread.parentPage.name

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
Community Expert ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

LATEST

In ExtendScript parentPage is no property of object Spread.

That would not work.

For example, if you have a spread in variable mySpread you could ask for the name of the first page of that spread like that:

mySpread.pages[0].name

Or you like to know the position of the first page of that spread in the document you could use documetOffset:

mySpread.pages[0].documentOffset

I really don't know what you are asking here.

Make yourself more clear what you want to do in what situation.

If you want to inspect the DOM documentation for InDesign CS5.5 see especially here:

Jongware

Indesign JavaScript Help

Regards,
Uwe

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