EPS, XPS, OXPS and PS Command Line Converters | CLI Tools

Overview

Need to make sure your documents can be opened on any device? Aspose.Page Convert is a command-line tool that lets developers and designers easily convert PS, EPS, and XPS files into more widely used formats. This ensures your documents are accessible on a variety of platforms.

Key Features

Benefits

Using the Aspose.Page Convert tool provides several advantages:

Licensing

While the Aspose.Page Convert application itself is free to use, converting documents requires a valid Aspose.Page license. You can purchase a license or use Aspose.Page in trial mode for evaluation purposes.

How to install EPS/XPS/PS Command-Line Converter?

The Aspose.Page Convert tool can be installed either globally or locally, depending on your project’s needs. We recommended you to use the local installation for project-specific use to avoid version conflicts.

Global Installation

To install Aspose.Page Convert globally on your machine, use the following command:

1dotnet tool install --global Aspose.Page.Convert

Specify the --version option if you need a specific version of the tool.

Local Installation

For local installation within a specific project, first, navigate to your project’s root directory. Then, execute the following commands:

  1. Create a tool-manifest if not already present:

    1dotnet new tool-manifest
  2. Install Aspose.Page Convert locally:

    1dotnet tool install Aspose.Page.Convert --local

Again, you can specify the --version option for a specific version.

Updating the EPS/XPS/PS CLI Converter

To update the Aspose.Page Convert Command Line tool to the latest version, use the dotnet tool update command with either --global or --local, matching your installation type.

Uninstalling the EPS/XPS/PS CLI Converter

If you need to uninstall the tool, use the dotnet tool uninstall command with either --global or --local, depending on how the tool was installed.

Usage

Command Line

Convert your documents using command-line arguments. Here are the available parameters:

Example command-line usage:

1Aspose.Page.Convert --input input.xps --output output.pdf --format pdf

How to integrate Page Description Language files CLI Converter into C# Projects?

The Aspose.Page Convert CLI application can also be integrated directly into your .NET projects using the command line, enabling programmatic access to document conversion capabilities within your C# code.

Adding the Command Line Converter to Your Project:

To add the Aspose.Page Convert tool to your Visual Studio project, navigate to your project’s root directory, and execute the following command:

1dotnet Aspose.Page.Convert add

This command incorporates Aspose.Page Convert’s features into your project. By including the library, you can use its methods and properties within your code. This empowers developers to create custom conversion workflows seamlessly within their applications.

Use from Code

Here is an example of using the Aspose.Page CLI tools programmatically in your C# code:

 1using Aspose.Page.MicroApps.Convert;
 2using System.Threading.Tasks;
 3
 4class Program
 5{
 6    static async Task Main(string[] args)
 7    {
 8        // Initialize convert options
 9        var options = new ConvertOptions
10        {
11            // Required: Specify the input document path
12            InputDocument = "input.xps",
13            
14            // Required: Specify the output document path
15            OutputFilePath = "output.png",
16            
17            // Optional: Specify the output format
18            ToFormat = "png",
19            
20            // Optional: Specify the width of the converted document (applicable for image formats)
21            Width = 1920, 
22            
23            // Optional: Specify the height of the converted document (applicable for image formats)
24            Height = 1080,
25            
26            // Optional: Specify the resolution of the converted document (applicable for image formats)
27            Resolution = 300
28        };
29
30        // Conditional: Apply license if you have one
31        if (isLicensed)
32        {
33            options.LicenseFile = "path_to_license.lic";
34        }
35
36        // Execute the conversion task
37        await ConvertTasks.Create(options).Execute();
38    }
39}

For more information and usage examples, please visit the Aspose.Page for .NET documentation.

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.