我在玩OpenXmlSDK,看看它是否是我们Powerpoint需求的可行解决方案。有一件事需要的是在Powerpoint中定位形状的能力。我一直在寻找一种方法来获得Shape的位置,但只能遇到MSDN“如何”http://msdn.microsoft.com/en-us/library/cc850828.aspx和位置类(但没有办法从形状中获取它)http://msdn.microsoft.com/en-us/library/office/documentformat.openxml.wordprocessing.position%28v=office.14%29.aspx。如何在Powerpoint中获取形状的位置和尺寸?
我怎么做这样的事情:
PresentationDocument presentationDocument = PresentationDocument.Open("C:\\MyDoc.pptx", true);
IdPartPair pp = presentationDocument.PresentationPart.SlideParts.First().Parts.FirstOrDefault();
var shape = pp.OpenXmlPart;
// How do I get the position and dimensions?