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
- Convert XPS, OXPS to JPG Image using C# or VB.NET
- Convert XPS, OXPS to PNG Image using C# or VB.NET
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:
- Load input XPS or OXPS file
- Initialize JpegSaveOptions object
- Specify SmoothingMode, Resolution, and PageNumbers to Render
- 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:
- Load input XPS or OXPS File
- Initialize PngSaveOptions Object
- Set image Resolution or PageNumbers for Rendering
- 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!