0

I am using Adobe InDesign CC.

I have a few images which are added as links in InDesign documents.

I want to read the location i.e X & Y co ordinates of those links on the document.

Following is my c# code to get all links. But I don't know how to get the co ordinates

            var links = activeDoc.Links;
            foreach (var l in links)
            {
                var link = (InDesign.Link)l;
            }

Or is there any other way?

MARKAND Bhatt
  • 2,428
  • 10
  • 47
  • 80

1 Answers1

2

Don't know the C# syntax but in ExtendScript that would be :

var links = app.activeDocument.Links;
var g, f, vb, x, y;
            for (l in links)
            {
    //g stands for a Graphic Object Instance.
    //Meaning the image inside the frame;
    g = l.parent;
    
    //f stands for the frame containing the image
    f = g.parent;
    
    //vb stands for the visible bounds of the frame including strokes effects
    vb = f.visibleBounds;
    
    //x is value of index 1 in vb
    //y is value of index 0 in vb 
    x = vb[1];
    y = vb[0];
            }

The syntax will be different but the concept is the same.

Loic
  • 2,173
  • 10
  • 13