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
- Supported Input Formats: PS, XPS, EPS.
- Supported Output Formats: PDF, JPEG, PNG, BMP, TIFF, EMF, WMF.
- Flexible Usage: Can be used both via simple command-line commands and programmatically in your C# code, compatible with .NET 6.0/7.0.
Benefits
Using the Aspose.Page Convert tool provides several advantages:
- Efficiency: Quickly convert documents Of Page Description Language formats without the need for complex software.
- Automation: Integrate EPS, XPS, OXPS and PS conversion into your automated workflows and scripts.
- Flexibility: Handle various document formats to ensure compatibility with different systems and applications.
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:
Create a tool-manifest if not already present:
1dotnet new tool-manifest
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:
-i, --input [Required]
: Path to the input document.- Example:
--input input.xps
- Example:
-o, --output [Required]
: Path for the converted document.- Example:
--output output.pdf
- Example:
-f, --format [Optional]
: Output document format.- Supported formats: PDF, JPEG, PNG, BMP, TIFF, EMF, WMF.
- Example:
--format pdf
-w, --width [Optional]
: Width of the converted document (for image formats).- Example:
--width 1920
- Example:
-h, --height [Optional]
: Height of the converted document (for image formats).- Example:
--height 1080
- Example:
-r, --resolution [Optional]
: Resolution of the converted document (for image formats).- Example:
--resolution 300
- Example:
-l, --license [Optional]
: Path to the Aspose.Page .NET license file.- Example:
--license path_to_license.lic
- Example:
-v, --verbose [Optional]
: Enable verbose output.- Example:
--verbose
- Example:
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.