web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Translating AI Builder...
Power Apps
Unanswered

Translating AI Builder Coordinates to Absolute Coordinates

(2) ShareShare
ReportReport
Posted on by 55

Hello everyone,

I'm currently working on a project where I need to accurately position text onto PDF files using coordinates obtained from AI Builder. However, I'm facing some challenges in understanding how to translate these coordinates to align with the absolute coordinate system used in my PDF documents. As far as I understand, the AI Builder coordinate system is in the top left corner where x increases towards the right, while y increases downwards. My PDF coordinate system I am working with is a Cartesian at the bottom left of the page. 

Here's what I'm trying to figure out:

  1. Absolute Coordinate System Clarification:

    • Can anyone provide insights into how I can establish the coordinates obtained from AI Builder within the absolute coordinate system used in PDF files?
  2. Conversion Process:

    • Are there any recommended methods or tools for converting coordinates from AI Builder's system to the absolute coordinate system used in PDF files? While I do understand there is a method to this I am interested in the aspects of the ImageWidth and ImageHeight - is there a way to get this information from the AI Builder?
  3. AI Builder Location Reference:

    • Where exactly is AI Builder positioned within the document it analyzes? Is it safe to assume its origin is at the top-left corner?
  4. Conversion Considerations:

    • What specific considerations should I keep in mind when converting AI Builder's coordinates, especially regarding the reversal of the y-axis?

Any advice, tips, or resources would be greatly appreciated! Thank you in advance for your assistance.

Categories:
  • Archy Profile Picture
    83 on at

    When working with AI Builder and PDF documents, there's a difference in how the coordinate systems are set up. AI Builder uses a coordinate system where the origin (0,0) is at the top-left corner, with the x-axis increasing to the right and the y-axis increasing downwards. However, PDF documents typically have their origin at the bottom-left corner, with the x-axis increasing to the right and the y-axis increasing upwards.

     

    So, if you get coordinates from AI Builder and want to position text accurately on a PDF, you need to convert those coordinates to match the PDF's coordinate system. The main thing you need to do is flip the y-coordinate. You can do this by subtracting the AI Builder y-coordinate from the total height of the PDF page or image area you're working with.

    For example, let's say AI Builder gives you a y-coordinate of 100, and the image height is 1000. To get the corresponding y-coordinate in the PDF system, you'd do 1000 - 100 = 900. This flips the y-axis to match how PDFs work.

     

    Now, there are a few other things to consider. You'll need to know the exact dimensions of the image area you're working with in AI Builder, so you can use those for the conversion. If the image dimensions in AI Builder and the PDF are different, you might need to apply scaling factors too.

    Additionally, AI Builder's coordinate system is based on the top-left corner of the image it analyzes. So you can generally assume its origin is at (0,0) in that top-left corner.

  • Johnnywhite Profile Picture
    23 on at
    1. Coordinate Alignment: Adjust AI Builder's coordinates to match PDF's absolute system. PDF's origin is typically at the bottom-left corner with the x-axis rightwards and y-axis upwards.

    2. Conversion Method: Use coordinate transformation tools or scripts to convert AI Builder's coordinates. Check AI Builder's documentation for ImageWidth and ImageHeight details.

    3. AI Builder's Position: Assume AI Builder's origin is at the top-left corner within the document analyzed.

    4. Considerations: Reverse the y-axis when converting AI Builder's coordinates. Account for any scaling factors or offsets.

    Hope this helps! Let me know if you need more info.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard