2017-07-10 24 views
0

私はAdobe InDesign CCを使用しています。Indesign.Linkの位置(XとY座標)を取得

InDesignのドキュメントにリンクとして追加されている画像がいくつかあります。

文書上のリンクのY座標がX &であることを確認したいと思います。

以下は、すべてのリンクを取得するためのC#コードです。しかし、私は共同座標

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

を取得したり、他の方法があるのか​​分かりませんか?

答えて

2

はC#構文を知らないが、ExtendScriptのであろうと:

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

構文は異なるものになりますが、考え方は同じです。

関連する問題