Hello,
I am evaluating Aspose Words for .Net,
I need to retrieve a absolute position of an object, it may be a paragraph or an image it doesnt realy matter.
I have tried a few things based in a few examples i have found in Aspose forums but i have been unable to get what i need.
Heres my test:
Document doc = new Document(filePath);
NodeCollection nc = doc.GetChildNodes(NodeType.Paragraph, true, false);
Paragraph p = (Paragraph) nc[nc.Count - 1];
PointF size = new PointF((float) p.ParentSection.PageSetup.PageWidth, (float) p.ParentSection.PageSetup.PageHeight);
Shape shape = new Shape(doc, ShapeType.Image);
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Margin;
shape.RelativeVerticalPosition = RelativeVerticalPosition.Paragraph;
shape.ImageData.SetImage(@"C:\temp\red.png");
shape.WrapSide = WrapSide.Both;
shape.WrapType = WrapType.TopBottom;
shape.Width = 100;
shape.Height = 100;
p.AppendChild(shape);
doc.UpdatePageLayout();
RectangleF bounds = new RectangleF((float) shape.Left, (float) shape.Top, (float) shape.Width, (float) shape.Height);
Is it possible to get an absolute position directly or indirectly from an object?
Best regards,
Luis Fernandes