Free Support Forum -

Add rectangle shape to an XPS document using Aspose.Page for .NET

Hello. How can I add rectangle shape to an XPS document? I can’t find documentation for this case. Thanks.


We are gathering related information and will get back to you shortly.

Thanks. I am waiting)


Rectangle is a path. So it can be added as a path. e.g.:

XpsPath path = doc.AddPath(doc.CreatePathGeometry("M 10,210 L 228,210 228,300 10,300"));

OR you can use any other way to create a path geometry, create a path based on it and add it to the current page or canvas.

Thank you for answer.