0
How to Determining TextFrame Position in IDML Using XML and Python: Handling Negative Values
New Here
,
/t5/indesign-discussions/how-to-determining-textframe-position-in-idml-using-xml-and-python-handling-negative-values/td-p/14836189
Sep 01, 2024
Sep 01, 2024
Copy link to clipboard
Copied
After extracting the IDML file, I checked the `TextFrame` elements in the `Spreads.xml` file.
However, when I calculate the position using a matrix, I get negative values.
The document size and the `TextFrame` size are calculated correctly, but I’m not sure how to properly calculate the position.
Can you help me with this?
* I am using Python.
<Title renamed by MOD>
TOPICS
How to
,
Scripting
,
SDK
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/indesign-discussions/how-to-determining-textframe-position-in-idml-using-xml-and-python-handling-negative-values/m-p/14836594#M587412
Sep 02, 2024
Sep 02, 2024
Copy link to clipboard
Copied
.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guide
,
LATEST
/t5/indesign-discussions/how-to-determining-textframe-position-in-idml-using-xml-and-python-handling-negative-values/m-p/14838504#M587506
Sep 03, 2024
Sep 03, 2024
Copy link to clipboard
Copied
Hi,
Coordinate spaces in IDML are detailed in the specification. The origin of the Spread space is its center point:
Then you use ItemTransform and PathGeometry elements to get space-relative coordinates, in pt.
Best,
Marc
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

