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

Getting Page number for Notes

New Here ,
Dec 19, 2008 Dec 19, 2008
Hi

I am using the below methods to retreive page number of notes.

Method 1

var myNotes = myDocument.stories.item(k).notes.everyItem().getElements();

Method 2

myDocument.stories.item(k).paragraphs.item(i).notes.length;

Wat is the best way to scan through the notes in a document. I am trying to get the page number for each note(Page on which the note is placed)

For Method 1:
var myFrame = myDocument.stories.item(k).textContainers[0];
var myPage=myFrame.parent.name;

For Method 2:
myDocument.stories.item(k).paragraphs.item(i).parentTextFrames[0].parent.name;

In both the cases some of the page numbers aren't displayed. Can somebody tell me is there any other way or am i doing something wrong.

Thanks
TOPICS
Scripting
437
Translate
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 ,
Dec 19, 2008 Dec 19, 2008
Footnotes have a property storyOffset, which is the location of the footnote's cue in the text. This is an insertion point, so the following line gives myFootnote's page number:
>myFootnote.storyOffset.parentTextFrames[0].parent.name

Peter
Translate
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
Enthusiast ,
Dec 19, 2008 Dec 19, 2008
Peter,

I think the OP was referring to the Notes feature (not footnotes) or
were you implying that the notes that were not showing the parent page
were in footnotes?
Translate
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
LEGEND ,
Dec 20, 2008 Dec 20, 2008
LATEST
Notes also have storyOffset...

--
Harbs
http://www.in-tools.com
Translate
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 ,
Dec 19, 2008 Dec 19, 2008
Fred,

You're absolutely right. I did read "notes", but -- ahem -- 'corrected' that to "footnotes". Sorry about that, Lakshmi.

Peter
Translate
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