Skip navigation
Currently Being Moderated

Indesign Object Coordinates

Jul 27, 2012 1:54 AM

Hi

 

I want to know about indesign object coordinates.

In .indd file coordinates take 32 byte for any coordinate for top, left, bottom, right or (x, y, width, height).

How calculate x and y value from these 8-8 byte.It contain floting value but not follow IEEE standered.

What format use to store coordinate in indesign .indd file.

When I create a text frame in indesign on first page using Facing option whose value are

X=0, Y=0, Width=50,Height=50 and ruler is set on (0,0).I am not using any rotation.

Then I find the 32 byte for this in .indd file

00 00 00 00 00 00 22 C0

67 BD 78 7C 6C 91 7A C0

EE 76 BB DD 6E D7 62 40

F0 01 9B CD 66 63 71 C0

How calculate x , y width, height value from these hex byte.

What standered use by indesign to store coordinate.

Is there is any function in sdk that take these hex value and return coordinate.

 

Thanks

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 11:34 PM   in reply to Bill joy

    Hi Bill joy,

     

    Check this out....

     

    //COORDINATES

     

    test();

    function test(){

    //alert(myDocument.rectangles.item(0).resolve(AnchorPoint.TOP_LEFT_ANC HOR,CoordinateSpaces.INNER_COORDINATES)[0]);

     

    var rectangleCount=myPage.rectangles.count();

    var i = 0;

    var coordinates=[];

    var multi=[];

    var multi1=[];

     

    for(var j=0;j<=rectangleCount-1;j++){

        var coordinatesValue = myDocument.rectangles[j].paths[0].pathPoints;

        for (; i < coordinatesValue.length; i++) {

         coordinates[i]=(coordinatesValue[i].anchor);

        }

     

    //alert(coordinates);

     

    var i=0;

    multi[j]=coordinates[i][i];

    multi1[j]=coordinates[i][i+1];

    alert(multi[j]);

    alert(multi1[j]);

    }

    }

     

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points