Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Extracting coordinates from XML or idml

New Here ,
Feb 04, 2025 Feb 04, 2025

Hello,

I'm trying to extract the (x,y) coordinates and width and height of textboxes and images after exporting as XML or idml. When I export it as HTML I can see the style tag that contains the coordinates in pixels. Where can I find this information in the XML or extracted XML from idml?

 

Example from html:

style="position:absolute;top:28.8px;left:42.6px;"
TOPICS
How to , Import and export
321
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 04, 2025 Feb 04, 2025

Egads. Lots deeper! Marc Autret wrote a whole book about it.

 

Happy reading, Kindl123!

 

 

Translate
LEGEND ,
Feb 04, 2025 Feb 04, 2025

Have you added ".zip" to your IDML file to get to the contents? 

 

And I don't think you'll get coordinates info from exported XML. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 04, 2025 Feb 04, 2025

You can't just open it up and find X,Y coordinates, no. But you (not me! looks like a massive slog to my eyes) can find the "ItemTransform" value. It's not trivial to turn that value into a pair of x,y coords, though. Kindl123, have you looked at the IDML specification? I only searched briefly, but in the 8.0 version published in 2012, I found a discussion of "Page Item Geometry" on page 104. I'd copy/paste it here, but for reasons I won't speculate about, the whole PDF is locked down with a password, and I can't copy/paste the relevant bit here. Suffiice it to say that it's Deeper Than It Looks.



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 04, 2025 Feb 04, 2025
LATEST

Egads. Lots deeper! Marc Autret wrote a whole book about it.

 

Happy reading, Kindl123!

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines