Convert EPS files using API for Java

Contents
[ Hide Show ]

This article explains how to convert EPS files using Java on the example of EPS to PDF Conversion.

Aspose.Page lets you convert EPS files via Java in BMP, JPG, EMF, TIFF, PNG, WMF and PDF formats.

Java EPS to BMP Conversion

You can check the quality of Aspose.Page EPS to PDF conversion and view the results via free online EPS to PDF Converter

Aspose.Page for Java EPS to PDF converter allows to convert Encapsulated PostScript (EPS) file to PDF document on any OS for which Java Virtual Machine exists.

It is necessary to do several steps in order to perform EPS to PDF conversion:

  1. Create an instance of PsDocument from EPS file.
  2. Use PdfSaveOptions(or ImageSaveOptions if you convert to an image format) to specify ImageFormat, Size, AdditionalFontsFolder and SuppressError values.
  3. Save the PostScript document as an image with image save options to an array of arrays of bytes. One array of bytes for one page of input document.
  4. Save resulting 2-dimensional arrays of bytes to BMP files creating for every byte array a new file output stream.
  5. If SuppressErrors value was true, as it is by default, it is possible to see what errors were thrown during the conversion of EPS to BMP and saved in Exceptions list.
                
            

See EPS to BMP conversion in .NET and C++.

Let’s consider ImageSaveOptions. Using this class we can assign different conversion parameters while converting EPS to BMP.

Evaluate EPS conversion online on our EPS Converter. You can convert several EPS files instantly and dowload results in a few seconds.

You can download examples and data files from GitHub.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.