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

JS(CS2) Page number of a linked graphic?

New Here ,
Apr 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

How do I return the page number of a linked graphic. <br />I'm trying to print out a list of the paths, index, and page numbers of all linked graphics in a doc. So far I've 2 of 3. Help.<br /><br />-------------------------------------------------------<br />g = app.activeDocument.allGraphics;<br />var myTextFrame = app.activeDocument.pages.item(0).textFrames.add(); <br /><br />for (i=0; i<g.length; i++){<br /> myTextFrame.contents = g.itemLink.filePath + "\t" + g.itemLink.index + "\r";
TOPICS
Scripting

Views

438

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 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

parent of link - rectangle/oval or character (as inline/anchored)
parent of rectangle/oval placed on page - page
parentTextFrames[0] of character - text frame
parent of text frame placed on page - page

robin

--
www.adobescripts.com

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
New Here ,
Apr 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

if i do
g.parent
i get Object Rectangle
if i do
g.parent.parent
i get the object page
How do i get the page number out of that page object?

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 ,
Apr 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

This gives you the graphic's page number:

g.parent.parent.name

Peter

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
New Here ,
Apr 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

Now how obvious was that? Thank you.

On Mon, Apr 14, 2008 at 1:52 PM, Peter Kahrel < member@adobeforums.com> wrote:

A new message was posted by Peter Kahrel in



InDesign Scripting --

  JS(CS2) Page number of a linked graphic?



This gives you the graphic's page number:

g. parent.parent.name

Peter





View/reply at JS(CS2) Page number of a linked graphic?

Replies by email are OK.

Use the unsubscribe form to cancel your email subscription.



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
New Here ,
Apr 14, 2008 Apr 14, 2008

Copy link to clipboard

Copied

LATEST
Perfect. 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