Copy link to clipboard
Copied
Hi,
On InDesign, I create two documents, A and B.
On document A, I’m using the “app.activeDocument.pages[0].rectangles.add()” to create a new rectangle on the first page.
In document B, I create the same rectangle using the tool (manually).
I export both documents as an IDML and extract the XML files for the same spread, comparing their contents. In the IDML of document A ItemTransform of the rectangle is “1 0 0 1 5 -391” while in document B ItemTransform is “1 0 0 1 0 0”. Also in document A most of the properties like GradientFillStart, GradientStrokeStart, PathPointType, etc values for X and Y are sifted by 5 and -391.
The problem is that when I’m trying to create a GradientFeather using a script providing the proper values for gradientStart, angle, length, etc the result is never correct on Document A but always ok on document B.
I search by printing out all the properties for the two documents, spreads, pages, and rectangles and everything returns the same values for all the properties…
I saw in the IDML’s specs that those two numbers in the ItemTranform are “the horizontal and vertical distances to move the object, relative to the center of the pasteboard”. How can I change that with script thought…
If I change those two values and build back the IDML gradient feather is the same in documents A and B.
I’m sending you here the files to reproduce the issue. I have instructions are into the ScriptA.jsx
Regards,
Jim
Copy link to clipboard
Copied