Convert PostScript EPS/PS to PNG or JPG Image in C#

convert-EPS-PS-to-PNG-JPG-image

PostScript PS/EPS files are frequently used for printing purposes as they are based on Page Description Languages. You can convert EPS or PS format PostScript files to image programmatically using C#. You will be learning the following PostScript file conversions in this article:

EPS/PS PostScript to PNG or JPG Image Converter – C# API Installation

Aspose.Page for .NET API lets you work with different page description file formats like EPS, PS, XPS, OXPS, etc. You can easily configure the API by downloading the DLL files from the Downloads section. Alternatively, you can install it from NuGet using the following installation command:

PM> Install-Package Aspose.Page

Convert PostScript EPS/PS to PNG Image Programmatically with C#

You can convert PostScript EPS or PS files to PNG image format with the steps below:

  1. Initialize PostScript input stream.
  2. Initialize ImageSaveOptions object with necessary parameters.
  3. Specify output image format as PNG.
  4. Render each page in the input file to an image.

The code below shows how to convert PostScript EPS or PS file to a PNG format image programmatically using C#:

Convert PostScript EPS/PS file to JPG Image Programmatically in C#

You can convert PostScript EPS/PS file to a JPG image with the following steps:

  1. Load input PostScript file into a stream.
  2. Initialize PsDocument class object.
  3. Set output image format as JPG.
  4. Save output images using the ImageDevice class object.

The following code shows how to convert PostScript EPS/PS file to a JPG image programmatically with C# language:

Free API License

You can test the API features without any limitations by getting a Free Temporary License.

Conclusion

In this article, you have learned how to convert or export a PostScript EPS/PS file to Images like PNG, JPG, etc. programmatically using C#. You can further explore the features by visiting API Documentation. Please contact us via the Free Support Forum in case of any queries.

See Also

Convert OXPS or XPS to PDF Programmatically using C#