Convert XPS files | .NET API Solution

Contents
[ Hide Show ]

This article explains how to convert XPS files using C# on the example of PS to PDF Conversion.

Aspose.Page lets you convert XPS files using C# in BMP, JPG, TIFF, PNG, and PDF formats.

C# XPS to PNG Conversion

You can check the quality of Aspose.Page XPS to PNG conversion and view the results via free online XPS to PNG Converter XPS Viewer, and other other apps, to manipulate PS files

Aspose.Page .NET XPS to PNG converter allows to convert XPS file with of any language supported by .NET platform: C#, VB, J#. All the conversions are performed in a similar way to the one shown in the example below.

Steps to perform XPS to PNG conversion:

  1. Create an instance of XpsDocument from an input XPS file.
  2. Specify SmoothingModeResolution and other options of PngSaveOptions(or PdfSaveOptions if you convert to PDF or other save option from the listed).
  3. Save the XPS document as image with the save options to an array of arrays of bytes. One array of bytes for one page of an input document.
  4. Save resulting 2-dimensional arrays of bytes to PNG files creating for every byte array a new file output stream.
                
            

See XPS to PNG conversion in Java and C++.

Let’s consider PngSaveOptions. Using this class we can assign different conversion parameters while converting XPS to PNG.

For converting XPS to PDF there are next parameters here:

Try XPS functionality conversion online on our XPS Converter. There you can convert several PS files at once and dowload results in a few seconds.

You can download examples and data files from GitHub.

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.