OpenXML distance, size units
Asked Answered
J

3

11

What are the measurement units used to specify sizes or X,Y cordinates in OpenXML? (Presentation).

Does it makes sense to match those with pixels, if so how can be those converted to pixels?

graphicFrame.Transform = new Transform(new Offset() { X = 1650609L, Y = 4343400L }, new Extents { Cx = 6096000L, Cy = 741680L });

In above code X is set to 1650609 units? What units are they?

Jea answered 25/11, 2013 at 13:32 Comment(1)
#60749903Robinetta
A
2

EMU is right, although converting EMU to PX depends on the image density. The conversion factor for 96ppi images is 9525, while for a 72ppi image is 12700 and for a 300ppi image is 3048.

So, the conversion factor would be emu's per inch (914,400) / image ppi.

Example: a 200px width image with a density of 300ppi, would give us 609,600 EMU:

609,600 EMU / (914,400 emus-per-inch / 300 pixels-per-inch) = 200 px
Aprilaprile answered 7/3, 2022 at 10:24 Comment(0)
F
1

I am using a web that is helping me a lot for these things. I have found it in another post about all measures in word and their equivalents. is that: https://unit-converter-bcmmybn3dq-ez.a.run.app/

I found in here Default WordML Unit Measurement ? pixel or point or inches

You just need EMUS to px and the page calculates the equivalent with a lot of decimal for precision.

I hope it really helps you.

Fortran answered 7/10, 2022 at 8:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.