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

Extracting coordinates from XML or idml

New Here ,
Feb 04, 2025 Feb 04, 2025

Copy link to clipboard

Copied

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

Views

85

Translate

Translate

Report

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

Copy link to clipboard

Copied

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. 

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.



Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

 

Happy reading, Kindl123!

 

 

Votes

Translate

Translate

Report

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