How to add vertical, horizontal or linear gradient to an XPS file is a question answered by Aspose.Page API solution. Learn the functionality for .NET... CreatePathGeometry ( "M 10,210 L 228,210 228,300 10,300"...AddPath (doc. CreatePathGeometry ( "M 10,110 L 228,110 228,200 10,200"...