Add Image inside XPS Documents

Contents
[ ]

Add Image

Aspose.Page for C++ API lets you create/read XPS documents and add image to it. This can be done by creating a Matrix and an ImageBrush to add the image to the XPS file. In order to add an image to XPS document, use the following steps.

  1. Create an object of XpsDocument class
  2. Create XpsPath object with defined Path Geometry
  3. Set Render Transformation for the path
  4. Save the document to disc using the Save method

Add Tiled Image

Aspose.Page for C++ offers XpsPath Class, with which you can add image on XPS document. You need to create Matrix and an ImageBrush, then specify XpsTileMode.Tile mode and save XpsDocument. Following code snippet shows complete functionality to add tiled image on an XPS document: