Copy link to clipboard
Copied
Hi
How can i get page number on witch the spread is located
Thanks
In InDesign CS 5.5 i use
spread.parentPage.name
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
Copy link to clipboard
Copied
In InDesign CS 5.5 i use
spread.parentPage.name
Copy link to clipboard
Copied
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
Regards,
Uwe