c# - Calculating absolute position with openXML -
i trying define absolute position of image , assing value this:
dw.horizontalposition horizontalposition1 = new dw.horizontalposition() { relativefrom = dw.horizontalrelativepositionvalues.column }; dw.positionoffset positionoffset1 = new dw.positionoffset(); positionoffset1.text = "-715645"; i same vertical position, time pass value should same value in word document 1.5, or 2.7 absolute position.
public static class mathopenxml { public const int oneemuincentimeters = 360000; public static double? centimeterstoemu(double? cm) { return (cm * oneemuincentimeters); } } and instead of hardcoded value have this:
dw.verticalposition verticalposition1 = new dw.verticalposition() { relativefrom = dw.verticalrelativepositionvalues.paragraph }; dw.positionoffset positionoffset2 = new dw.positionoffset(); positionoffset2.text = mathopenxml.centimeterstoemu(verticalposition).tostring(); the thing value not same, pass 0.24 in verticalposition, , 0.9, close not same, please :/
thanks
Comments
Post a Comment