XPS OXPS to PNG JPG Image C#

XPS file format is frequently used in file processing applications. You can convert XPS or OXPS to JPG or PNG image programmatically with C# or VB.NET in your .NET framework based applications. Let us walk through the following scenarios to learn more about XPS conversion:

XPS, OXPS to JPG or PNG Image Converter API – Installation

You can easily convert XPS or OXPS files to JPG or PNG Image with few simple API calls. Aspose.Page for .NET API includes different features to work with XPS, OXPS, and several other supported file formats. You can easily download the ZIP file from the Downloads section, or you can install it via NuGet Package Manager with the following command:

Install-Package Aspose.Page -Version 20.10.0

After configuring the API, you can efficiently work with XPS or OXPS files in your .NET applications.

Convert XPS, OXPS to JPG Image using C# or VB.NET

JPG files are famous because of their support in all system environments. You can convert an XPS or OXPS file to a JPG image programmatically using C# or VB.NET. You should follow the following steps for XPS or OXPS to JPG image conversion:

  1. Load input XPS or OXPS file
  2. Initialize JpegSaveOptions object
  3. Specify SmoothingMode, Resolution, and PageNumbers to Render
  4. Save output JPG image

The following code shows how to convert XPS or OXPS to JPG Image using C# language:

Convert XPS, OXPS to PNG Image using C# or VB.NET

You may need to convert an XPS or OXPS file to PNG using C# or VB.NET with Aspose.Page for .NET API. You need to follow the steps below for XPS to PNG conversion:

  1. Load input XPS or OXPS File
  2. Initialize PngSaveOptions Object
  3. Set image Resolution or PageNumbers for Rendering
  4. Save output PNG image

The code snippet below shows how to convert XPS or OXPS file to PNG image programmatically using C#:

Conclusion

In this article, we have learned how to convert an XPS or OXPS file to JPG or PNG image using C# or VB.NET programmatically. Likewise, several other file format APIs are supported by Aspose.Page for .NET. You can refer to the Product Documentation or API References to learn more about the features offered by the API. Moreover, you can always get in touch with us via the Free Support Forums. Feel free to share your feedback or queries!

See Also