Add Text in XPS Document

Contents
[ ]

Add Text to XPS

Aspose.Page for C++ lets you add text to an XPS document in your C++ applications. The XpsGlyphs class lets you add text to an XPS document by specifying the brush of your choice. Text can be added to an XPS document using the following steps:

  1. Create a new instance of XPSDocument class
  2. Create a brush using the XpsSolidColorBrush class
  3. Add glyph to the document object with required font information
  4. Save the file using the Save method of XPSDocument class

The following code snippet shows complete functionality for adding text to an XPS document using C++.

Add Text Using Encoding String

Aspose.Page for C++ offers XpsGlyphs Class, with which you can add text using Encoding String on an XPS document. You need to specify a brush using BidiLevel property of XpsGlyphs class. Following code snippet shows complete functionality to add text using encoding string: