Question
Urgent: Duplicating rectangle to new page. Trouble in fixing the coordinates
Hi,
Adobe Indesign CS3 Server Object model:
Javascripting using extended toolscript version 5
Windows
I have tried to duplicate a rectangle from a previous page, to a new page with the following code.
var oldPage = myDocument.pages.item(0)
var newPage = myDocument.pages.item(1)
var oldPageRect = oldPage.rectangles;
var newRecOnNewPage = oldpageRect.item(0).duplicate(newPage)
the geometric coordinates of the the recatngle that was duplicated,
one on the first page, (13.5, 35.0416, 23.5, 45.0416)
However the duplicate rectangle on the second sheet, showed
(13.5, 185.0416, 23.5, 195.0416)...(Please Note:The coordinates have not been exactly quoted)
This made me think, that perhaps, the (0,0) of the page lies on the first page, and the second page is considered an appendage added to the first page, horizontally.
I would like to know, how to disassociate the relative scale of the rectangle from the axis on the first page, and allow it to be considered as a new object lying on a x, y coordinate plane based on the second page alone.
This is Urgent! Kindly help resolve
Thanks in advance,
Saranya Harikrishnan
Adobe Indesign CS3 Server Object model:
Javascripting using extended toolscript version 5
Windows
I have tried to duplicate a rectangle from a previous page, to a new page with the following code.
var oldPage = myDocument.pages.item(0)
var newPage = myDocument.pages.item(1)
var oldPageRect = oldPage.rectangles;
var newRecOnNewPage = oldpageRect.item(0).duplicate(newPage)
the geometric coordinates of the the recatngle that was duplicated,
one on the first page, (13.5, 35.0416, 23.5, 45.0416)
However the duplicate rectangle on the second sheet, showed
(13.5, 185.0416, 23.5, 195.0416)...(Please Note:The coordinates have not been exactly quoted)
This made me think, that perhaps, the (0,0) of the page lies on the first page, and the second page is considered an appendage added to the first page, horizontally.
I would like to know, how to disassociate the relative scale of the rectangle from the axis on the first page, and allow it to be considered as a new object lying on a x, y coordinate plane based on the second page alone.
This is Urgent! Kindly help resolve
Thanks in advance,
Saranya Harikrishnan