Convert EPS with Aspose.Page C++ API

This article explains how to convert EPS files using C++ on the example of EPS to WMF Conversion.

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

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

Aspose.Page for C++ EPS to PNG converter allows to convert Encapsulated PostScript (EPS) file to PNG image on Windows and Linux.

It is necessary to do several steps to perform EPS to PNG conversion:

  1. Create an instance of PsDocument from EPS file.
  2. Use ImageSaveOptions(or PdfSaveOptions if you convert to PDF) to specify AdditionalFontsFolder and SuppressError boolean values.
  3. Call SaveAsImage to 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 PNG files creating for every byte array a new file output stream.
  5. If the SuppressErrors value was true, as it is by default, It is possible to see what errors were thrown during the conversion of EPS to PNG.

The following code snippet shows how to convert EPS to PNG files in C++:

                
            

For complete examples and data files, please go to https://github.com/aspose-page/Aspose.Page-for-C

Also check EPS to PNG conversion via .Net and Java.

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

Evaluate EPS to PNG conversion online on our EPS to PNG Converter. You can convert several EPS files to PNG at once and download results in a few seconds.

You can download examples and data files from GitHub.

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.